-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
79 lines (54 loc) · 1.81 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
71
72
73
74
75
76
77
78
cmake_minimum_required (VERSION 3.8)
project ("VisualMan")
set(CMAKE_CXX_STANDARD 17) # C++17 is required
if(WIN32)
add_definitions(-DNOMINMAX) # min and max are recoginized as macro on windows
endif()
if(CMAKE_COMPILER_IS_GNUCXX) # options for gnu compliler
add_compile_options(-fpermissive)
add_compile_options(-std=c++17)
endif()
# Shared or static library
option(VM_SHARED_LIBRARY "Set to On to build using dynimic linking" OFF)
if(VM_SHARED_LIBRARY)
add_definitions(-DVM_SHARED_LIBRARY)
set(VM_SHARED_OR_STATIC "SHARED")
else()
set(VM_SHARED_OR_STATIC "STATIC")
endif()
option(VM_BUILD_OLD_LARGE_VOLUME_RENDERER "Set to On to build the old large volume renderer")
# Test build
option(VM_BUILD_QT5_GUIBINDING "Set to On to build qt5 binding")
option(VM_BUILD_GLFW_GUIBINDING "Set to On to build glfw binding")
option(VM_BUILD_QT5_EXAMPLE "Set to On to build qt5 example")
if(VM_BUILD_QT5_EXAMPLE)
set(VM_BUILD_QT5_GUIBINDING "On")
endif()
option(VM_BUILD_GLFW_EXAMPLE "Set to On to build glfw example")
if(VM_BUILD_GLFW_EXAMPLE)
set(VM_BUILD_GLFW_GUIBINDING "On")
endif()
# GuiBinding build
# Tools Build
option(VM_BUILD_TOOLS "Set to On to build tools" ON)
#---------------------------------------------------
# Build Type
#---------------------------------------------------
# OpenMP
FIND_PACKAGE(OpenMP)
if(OPENMP_FOUND)
message("OPENMP FOUND")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
message(STATUS ${OpenMP_EXE_LINKER_FLAGS})
endif()
include(scripts/external.cmake)
vm_external_module(
GIT_REPOSITORY https://github.com/cad420/VMCore.git
GIT_TAG master
)
add_subdirectory("src")
add_subdirectory("guibinding")
add_subdirectory("test")