-
Notifications
You must be signed in to change notification settings - Fork 89
/
CMakeLists.txt
70 lines (55 loc) · 1.66 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#export CMAKE_PREFIX_PATH=path to Qt/5.5/gcc_64/ (where you would find bin/qmake)
cmake_minimum_required(VERSION 3.1)
project(nexus)
option(BUILD_NXS_BUILD "" ON)
option(BUILD_NXS_EDIT "" ON)
option(BUILD_NXS_VIEW "" ON)
set (CMAKE_CXX_STANDARD 11)
# enable setting options with SET cmake command
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
find_package(Qt5Widgets)
if (BUILD_NXS_VIEW)
include(${CMAKE_CURRENT_SOURCE_DIR}/src/cmake/tools.cmake)
endif()
# nexus version
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/NEXUS_VERSION")
file (READ "${CMAKE_CURRENT_SOURCE_DIR}/NEXUS_VERSION" NEXUS_VERSION)
else()
message(FATAL_ERROR "NEXUS_VERSION file not found in the repository")
endif()
# VCGLib -- required
if (VCGDIR) # VCGDIR exists - using custom user vcglib path
if(EXISTS ${VCGDIR})
add_subdirectory(${VCGDIR} ${CMAKE_CURRENT_BINARY_DIR}/vcglib)
message(STATUS "nexus - VCGLib - using custom VCGDIR path library")
else()
set(VCGDIR NOTFOUND)
endif()
else()
get_filename_component(VCGDIR "${CMAKE_CURRENT_LIST_DIR}/../vcglib" ABSOLUTE)
if(EXISTS ${VCGDIR})
add_subdirectory(${VCGDIR} ${CMAKE_CURRENT_BINARY_DIR}/vcglib)
message(STATUS "nexus - VCGLib - using bundled source")
else()
set(VCGDIR NOTFOUND)
endif()
endif()
set(VCGDIR "${VCGDIR}")
if(NOT VCGDIR)
message(FATAL_ERROR "VCGLib not found.")
endif()
#corto options
set(BUILD_CORTO_CODEC_UNITY OFF)
set(BUILD_CORTO_EXE OFF)
add_subdirectory(src/corto EXCLUDE_FROM_ALL)
add_subdirectory(src)
if (BUILD_NXS_BUILD)
add_subdirectory(src/nxsbuild)
endif()
if(BUILD_NXS_EDIT)
add_subdirectory(src/nxsedit)
endif()
if(BUILD_NXS_VIEW)
add_subdirectory(src/nxsview)
endif()