-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
30 lines (21 loc) · 1.03 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
project(tri-mesh-hole-closer)
cmake_minimum_required(VERSION 3.13)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
add_library(${PROJECT_NAME} INTERFACE)
# libigl
option(LIBIGL_WITH_TRIANGLE "Use Triangle" ON)
target_include_directories(${PROJECT_NAME} INTERFACE external/libigl/include)
target_include_directories(${PROJECT_NAME} INTERFACE external/libigl/external/triangle)
find_package(LIBIGL REQUIRED QUIET)
# eigen (header only library)
target_include_directories(${PROJECT_NAME} INTERFACE external/eigen)
# robin-map (header only library)
target_include_directories(${PROJECT_NAME} INTERFACE external/robin-map)
target_link_libraries(${PROJECT_NAME} INTERFACE igl::triangle)
# set project include dir
target_include_directories(${PROJECT_NAME} INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")