-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
executable file
·110 lines (87 loc) · 3.38 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
project(Tileable_Shell_public)
cmake_minimum_required(VERSION 3.1)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE "Release")
#########################################
##### #####
##### Option #####
##### #####
#########################################
# libigl
option(LIBIGL_WITH_OPENGL "Use OpenGL" ON)
option(LIBIGL_WITH_OPENGL_GLFW "Use GLFW" ON)
option(LIBIGL_WITH_OPENGL_GLFW_IMGUI "Use ImGui" ON)
option(LIBIGL_WITH_CGAL "Use CGAL" ON)
option(LIBIGL_WITH_PNG "Use Png" ON)
#########################################
##### #####
##### External Library #####
##### #####
#########################################
#EIGEN
find_package (Eigen3 3.3 REQUIRED NO_MODULE)
#Boost
find_package(Boost REQUIRED COMPONENTS system filesystem thread REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
#3rd party library
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/ext/pugixml")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/ext/matplotlib_cpp")
add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/ext")
#########################################
##### #####
##### Core Library #####
##### #####
#########################################
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
file(GLOB 3DCoreFiles
src/Mesh/*.h
src/Mesh/*.cpp
src/Utility/*.h
src/Utility/*.cpp
src/TileableStructure/*.h
src/TileableStructure/*.cpp
src/Clustering/fastcluster.h
src/Clustering/fastcluster.cpp
src/Clustering/dkm.hpp
src/Clustering/dkm_parallel.hpp
src/Clustering/dkm_utils.hpp
)
include_directories(src)
add_library(3DCorelib STATIC ${3DCoreFiles})
target_compile_options(3DCorelib PUBLIC "-Wno-deprecated-declarations")
target_include_directories(3DCorelib PUBLIC SYSTEM
${ext_include}
${CMAKE_CURRENT_SOURCE_DIR}/src/
)
target_link_libraries(3DCorelib PUBLIC
${ext_lib})
target_link_libraries(3DCorelib PUBLIC ${Boost_FILESYSTEM_LIBRARY}
${Boost_SYSTEM_LIBRARY})
#########################################
##### #####
##### Gui Library #####
##### #####
#########################################
file(GLOB 3DRenderFiles
src/Mesh/*.h
src/Mesh/*.cpp
src/TileableStructure/*.h
src/TileableStructure/*.cpp
src/Render/*.h
src/Render/*.cpp)
add_library(3DRenderlib STATIC ${3DRenderFiles})
target_include_directories(3DRenderlib PUBLIC SYSTEM
${ext_include}
${CMAKE_CURRENT_SOURCE_DIR}/src/Render/
)
target_link_libraries(3DRenderlib PUBLIC
${ext_lib})
#########################################
##### #####
##### Gui Program #####
##### #####
#########################################
add_executable(${PROJECT_NAME}_bin ${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp)
target_link_libraries(${PROJECT_NAME}_bin PUBLIC 3DCorelib)
target_link_libraries(${PROJECT_NAME}_bin PUBLIC 3DRenderlib)