-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
66 lines (50 loc) · 1.88 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
cmake_minimum_required(VERSION 3.16.3)
project(ShapesForGarments)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# set output paths
set(PROJECT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR})
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/")
# pmp-library
set(PMP_BUILD_EXAMPLES OFF CACHE BOOL "")
set(PMP_BUILD_TESTS OFF CACHE BOOL "")
set(PMP_BUILD_DOCS OFF CACHE BOOL "")
set(PMP_BUILD_VIS ON CACHE BOOL "")
set(PMP_INSTALL OFF CACHE BOOL "")
set(PMP_STRICT_COMPILATION ON CACHE BOOL "")
set(BUILD_SHARED_LIBS OFF CACHE BOOL "")
add_subdirectory(${PROJECT_SOURCE_DIR}/external/pmp-library)
include_directories(${PROJECT_SOURCE_DIR}/external/pmp-library/src)
include_directories(${PROJECT_SOURCE_DIR}/external/pmp-library/external/eigen-3.4.0)
include_directories(${PROJECT_SOURCE_DIR}/external/pmp-library/external/glfw-3.3.8/include)
include_directories(${PROJECT_SOURCE_DIR}/external/pmp-library/external/imgui-1.89.8)
# cmake modules
include(FetchContent)
# fbx sdk
find_package(FBX)
if (NOT FBX_FOUND)
message("FBX SDK not found")
else()
include_directories(${FBX_INCLUDE_DIRS})
endif()
# cgal
# set(CMAKE_BUILD_TYPE "Release")
find_package(CGAL REQUIRED)
#target_link_libraries(<Target> CGAL::CGAL)
# nlohmann json
find_package(nlohmann_json 3.11.0)
# argparse
include(cmake/modules/Argparse.cmake)
if (NOT nlohmann_json_FOUND)
include(FetchContent)
FetchContent_Declare(json URL https://github.com/nlohmann/json/releases/download/v3.11.2/json.tar.xz)
FetchContent_MakeAvailable(json)
endif ()
# set C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(COMMON_CXX_FLAGS "-pedantic -Wall -Wextra -Wshadow")
set(CMAKE_CXX_FLAGS ${COMMON_CXX_FLAGS})
include_directories(${PROJECT_SOURCE_DIR}/src)
add_subdirectory(src)