-
Notifications
You must be signed in to change notification settings - Fork 11
/
CMakeLists.txt
104 lines (84 loc) · 3.33 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
cmake_minimum_required(VERSION 3.0)
project(scaffold-map)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
option(LIBIGL_USE_STATIC_LIBRARY "Use libigl as static library" OFF)
option(LIBIGL_WITH_CGAL "Use CGAL" OFF)
option(LIBIGL_WITH_COMISO "Use CoMiso" OFF)
option(LIBIGL_WITH_CORK "Use Cork" OFF)
option(LIBIGL_WITH_EMBREE "Use Embree" OFF)
option(LIBIGL_WITH_LIM "Use LIM" OFF)
option(LIBIGL_WITH_MATLAB "Use Matlab" OFF)
option(LIBIGL_WITH_MOSEK "Use MOSEK" OFF)
option(LIBIGL_WITH_OPENGL "Use OpenGL" ON)
option(LIBIGL_WITH_OPENGL_GLFW "Use GLFW" ON)
option(LIBIGL_WITH_OPENGL_GLFW_IMGUI "Use menu" ON)
option(LIBIGL_WITH_PNG "Use PNG" ON)
option(LIBIGL_WITH_TETGEN "Use Tetgen" ON)
option(LIBIGL_WITH_TRIANGLE "Use Triangle" ON)
option(LIBIGL_WITH_VIEWER "Use OpenGL viewer" ON)
option(LIBIGL_WITH_XML "Use XML" OFF)
option(LIBIGL_WITH_PYTHON "Use Python" OFF)
option(NOGUI "Just for Profiling" OFF)
if(NOGUI)
list(APPEND LIBIGL_DEFINITIONS "-DNOGUI")
endif()
include(DownloadProject)
if (NOT TARGET igl::core)
download_project(
PROJ libigl
SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/libigl
DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/external/.cache/libigl
QUIET
GIT_REPOSITORY https://github.com/libigl/libigl.git
GIT_TAG 682e4b9685d2737215f6629ecafcb318d714d556
)
set(LIBIGL_INCLUDE_DIR )
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/external/libigl/cmake")
include(libigl)
endif()
if (NOT TARGET CLI11::CLI11)
download_project(
PROJ cli11
SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/cli11
DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/external/.cache/cli11
URL https://github.com/CLIUtils/CLI11/archive/v1.9.1.tar.gz
URL_MD5 13a8872af1137c8139cb5b77b1e50b39
)
add_subdirectory(${CMAKE_SOURCE_DIR}/external/cli11)
endif()
# Add your project files
add_library(scaffold_map
src/ReWeightedARAP.cpp
src/ReWeightedARAP_solve.cpp
src/ScafData.cpp
src/StateManager.cpp
)
target_link_libraries(scaffold_map PUBLIC igl::triangle igl::core igl::tetgen igl::opengl_glfw igl::png)
FILE(GLOB SRCFILES
"src/Newton/*.cpp")
add_library(scaf_utils
src/UI/DeformGUI.cpp
src/UI/DeformGUI_key_press.cpp
src/util/triangle_utils.cpp
src/demo/flow_demo.cpp
src/demo/parameterization_init.cpp
src/demo/tight_packing_demo.cpp
src/util/tet_utils.cpp
src/util/tetgenio_parser.cpp
${SRCFILES})
add_executable(scaf_pack_bin src/main_texture.cpp
src/UI/TextureGUI.cpp
src/UI/TextureGUI_extended_menu.cpp
src/UI/TextureGUI_mouse_control.cpp)
add_executable(scaf_param_bin src/main.cpp)
add_executable(scaf_flow_bin src/main_flow.cpp)
target_link_libraries(scaf_utils PUBLIC igl::png igl::triangle igl::tetgen igl::opengl_glfw igl::opengl_glfw_imgui)
target_link_libraries(scaf_pack_bin
igl::png scaffold_map scaf_utils CLI11::CLI11)
target_link_libraries(scaf_param_bin
igl::png scaffold_map scaf_utils CLI11::CLI11)
target_link_libraries(scaf_flow_bin
igl::png scaffold_map scaf_utils CLI11::CLI11 igl::tetgen)