-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
50 lines (36 loc) · 1.48 KB
/
CMakeLists.txt
File metadata and controls
50 lines (36 loc) · 1.48 KB
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
cmake_minimum_required(VERSION 3.12)
project(MeshSkeletonizationPlugin VERSION 0.1)
# Dependencies
find_package(Sofa.Config REQUIRED)
sofa_find_package(Sofa.Core REQUIRED)
sofa_find_package(CGAL REQUIRED)
message(STATUS "CGAL VERSION = ${CGAL_VERSION}")
set(PLUGIN_SKELETONIZATION_SRC_DIR src/MeshSkeletonizationPlugin)
set(HEADER_FILES
${PLUGIN_SKELETONIZATION_SRC_DIR}/config.h.in
${PLUGIN_SKELETONIZATION_SRC_DIR}/init.h
${PLUGIN_SKELETONIZATION_SRC_DIR}/MeshSkeletonization.h
${PLUGIN_SKELETONIZATION_SRC_DIR}/MeshSkeletonization.inl
)
set(SOURCE_FILES
${PLUGIN_SKELETONIZATION_SRC_DIR}/init.cpp
${PLUGIN_SKELETONIZATION_SRC_DIR}/MeshSkeletonization.cpp
)
set(README_FILES README.md)
# Create the plugin library.
add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES} ${README_FILES})
if(CGAL_VERSION VERSION_GREATER 4.9) # if CGAL >= 4.10
target_compile_definitions(${PROJECT_NAME} PUBLIC "-DCGAL_MESH_3_VERBOSE=0")
endif()
# Link the plugin library to its dependencies (other libraries).
target_link_libraries(${PROJECT_NAME} PUBLIC Sofa.Core)
target_link_libraries(${PROJECT_NAME} PUBLIC CGAL::CGAL)
# Install rules for the library and the headers; CMake package configurations files
sofa_create_package_with_targets(
PACKAGE_NAME ${PROJECT_NAME}
PACKAGE_VERSION ${PROJECT_VERSION}
TARGETS ${PROJECT_NAME} AUTO_SET_TARGET_PROPERTIES
INCLUDE_SOURCE_DIR "src"
INCLUDE_INSTALL_DIR "MeshSkeletonizationPlugin"
RELOCATABLE "plugins"
)