-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
61 lines (50 loc) · 1.95 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
######################################################################
## CMakeLists.txt --- gsUnstructuredSplines
## This file is part of the G+Smo library.
##
######################################################################
## gsUnstructuredSplines module
project(gsUnstructuredSplines)
# Apply G+Smo config
include(gsConfig)
## Collect files
aux_header_directory (${CMAKE_CURRENT_SOURCE_DIR}/src ${PROJECT_NAME}_H )
aux_cpp_directory (${CMAKE_CURRENT_SOURCE_DIR}/src ${PROJECT_NAME}_CPP)
aux_tmpl_header_directory(${CMAKE_CURRENT_SOURCE_DIR}/src ${PROJECT_NAME}_HPP)
if( (NOT GISMO_BUILD_LIB) )
aux_instance_directory (${CMAKE_CURRENT_SOURCE_DIR} ${PROJECT_NAME}_INS)
if(${PROJECT_NAME}_INS)
LIST( REMOVE_ITEM ${PROJECT_NAME}_CPP ${${PROJECT_NAME}_INS})
endif()
endif()
# Add object library
add_library(${PROJECT_NAME} OBJECT
${${PROJECT_NAME}_H}
${${PROJECT_NAME}_HPP}
${${PROJECT_NAME}_CPP} )
set_target_properties(${PROJECT_NAME} PROPERTIES
COMPILE_DEFINITIONS gismo_EXPORTS
POSITION_INDEPENDENT_CODE ON
LINKER_LANGUAGE CXX
FOLDER "G+Smo modules" )
set(gismo_MODULES ${gismo_MODULES} $<TARGET_OBJECTS:${PROJECT_NAME}>
CACHE INTERNAL "G+Smo modules" )
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}/src"
DESTINATION include/gismo
FILES_MATCHING PATTERN "*.h" )
# add filedata folder
add_definitions(-DELAST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/filedata/")
# add example files
if(GISMO_BUILD_EXAMPLES)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/examples)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tutorials)
else()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/examples EXCLUDE_FROM_ALL)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tutorials EXCLUDE_FROM_ALL)
endif(GISMO_BUILD_EXAMPLES)
# add unittests
if(GISMO_BUILD_UNITTESTS)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/unittests)
else()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/unittests EXCLUDE_FROM_ALL)
endif(GISMO_BUILD_UNITTESTS)