-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
58 lines (45 loc) · 1.9 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
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(
PPSfromTriangleMeshes
VERSION 1.0
DESCRIPTION "A library to generate parametric pseudo-manifolds from triangle meshes"
LANGUAGES CXX)
message (STATUS "CMAKE_CURRENT_SOURCE_DIR is ${CMAKE_CURRENT_SOURCE_DIR}")
if (NOT CMAKE_BUILD_TYPE)
message (STATUS "Setting build type to 'Release' as none was specified")
set (CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build" FORCE)
endif()
message (STATUS "Build type: ${CMAKE_BUILD_TYPE}")
message (STATUS "Generated with config types: ${CMAKE_CONFIGURATION_TYPES}")
# enable folders for projects in Visual Studio
if (CMAKE_GENERATOR MATCHES "Visual Studio")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
# ensure -std=c++xx instead of -std=g++xx
set (CMAKE_CXX_EXTENSIONS OFF)
# support folders in IDE's
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# indicate documentation build as an option and set it to ON by default
option(BUILD_DOC "Build documentation" ON)
# docs only available if this is the main app
find_package(Doxygen QUIET)
if (Doxygen_FOUND)
add_subdirectory(doc)
install(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} --target doc)")
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/doc)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/latex DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/doc)
else()
message (STATUS "Doxygen not found, not building docs")
endif()
endif()
# Library code is here
add_subdirectory(src/library/dcel)
add_subdirectory(src/library/off)
add_subdirectory(src/library/pps)
add_subdirectory(src/library/ppsfromloop)
add_subdirectory(src/library/ppsfrompnt)
add_subdirectory(src/library/utils)
# Application code is here
add_subdirectory(src/app/sampler-pnt)
add_subdirectory(src/app/sampler-loop)