-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
63 lines (51 loc) · 1.94 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
cmake_minimum_required (VERSION 3.5)
project (pcl_lbo LANGUAGES CXX)
set (CMAKE_CXX_STANDARD 14)
find_package (PCL REQUIRED)
find_package (Eigen3 REQUIRED)
find_package (CGAL REQUIRED)
find_package (Boost REQUIRED COMPONENTS program_options filesystem)
find_package (SuiteSparse REQUIRED COMPONENTS CHOLMOD)
add_library (PCL::PCL INTERFACE IMPORTED)
target_link_libraries (PCL::PCL INTERFACE ${PCL_LIBRARIES})
target_include_directories (PCL::PCL INTERFACE ${PCL_INCLUDE_DIRS})
add_library (SuiteSparse::Cholmod INTERFACE IMPORTED)
target_link_libraries (SuiteSparse::Cholmod INTERFACE ${SuiteSparse_CHOLMOD_LIBRARY_RELEASE})
target_include_directories (SuiteSparse::Cholmod INTERFACE ${SuiteSparse_INCLUDE_DIRS})
add_library (pclbo
"src/meshlbo.cpp"
"src/meshgeoheat.cpp"
"src/voronoi_diagram.cpp")
target_include_directories (pclbo PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_link_libraries (pclbo
PUBLIC
PCL::PCL
PRIVATE
CGAL::CGAL
Eigen3::Eigen
SuiteSparse::Cholmod)
install (TARGETS pclbo DESTINATION lib)
install (DIRECTORY include/pclbo DESTINATION include)
##############################################################################
# Compile a demo #
##############################################################################
add_executable (visualize_eigenfunctions EXCLUDE_FROM_ALL src/eigenfunctions_demo.cpp)
target_link_libraries (visualize_eigenfunctions
PRIVATE
pclbo
Boost::program_options
Boost::filesystem)
add_executable (heat EXCLUDE_FROM_ALL src/heat_demo.cpp)
target_link_libraries (heat
PRIVATE
pclbo)
add_executable (geoheat EXCLUDE_FROM_ALL src/geoheat_demo.cpp)
target_link_libraries (geoheat
PRIVATE
pclbo)
add_executable (mesh_geoheat EXCLUDE_FROM_ALL src/mesh_geoheat_demo.cpp)
target_link_libraries (mesh_geoheat
PRIVATE
pclbo
Boost::program_options
Boost::filesystem)