forked from sofa-framework/sofa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.cmake
87 lines (72 loc) · 2.84 KB
/
package.cmake
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
######################
# Wrapper macro to set boolean value to a variable
macro(setSofaOption name value)
set(${name} "${value}" CACHE BOOL "" FORCE)
set(quiet "${ARGV2}")
if(NOT quiet)
message("${name} ${${name}}")
endif()
endmacro()
macro(setSofaPath name value)
set(${name} "${value}" CACHE PATH "" FORCE)
message("${name} ${${name}}")
endmacro()
macro(setSofaString name value)
set(${name} "${value}" CACHE STRING "" FORCE)
message("${name} ${${name}}")
endmacro()
macro(setSofaFilePath name value)
set(${name} "${value}" CACHE FILEPATH "" FORCE)
message("${name} ${${name}}")
endmacro()
######################
message("---------- Setting some options ---------")
# Setting all applications/modules/plugins OFF
get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
if(_variableName MATCHES "^PLUGIN_" OR _variableName MATCHES "^MODULE_" OR _variableName MATCHES "^APPLICATION_")
setSofaOption(${_variableName} OFF TRUE)
endif()
endforeach()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
setSofaString(CMAKE_CXX_FLAGS "-std=c++11")
endif()
setSofaOption(APPLICATION_RUNSOFA ON)
setSofaOption(SOFA_BUILD_TESTS OFF)
setSofaOption(SOFA_BUILD_TUTORIALS OFF)
setSofaOption(SOFA_BUILD_METIS ON)
# Copy resources files (etc/, share/, examples/) when installing
setSofaOption(SOFA_INSTALL_RESOURCES_FILES ON)
message("-------- Setting some modules ON --------")
setSofaOption(MODULE_SOFAEXPORTER ON)
setSofaOption(MODULE_SOFAHAPTICS ON)
setSofaOption(MODULE_SOFASPARSESOLVER ON)
setSofaOption(MODULE_SOFAPRECONDITIONER ON)
setSofaOption(MODULE_SOFAOPENGLVISUAL ON)
message("-------- Setting some plugins ON --------")
setSofaOption(PLUGIN_SOFAPYTHON ON)
setSofaOption(PLUGIN_SOFACOMPONENTALL ON)
setSofaOption(PLUGIN_CIMGPLUGIN ON)
setSofaOption(PLUGIN_SOFAEULERIANFLUID ON)
setSofaOption(PLUGIN_SOFASPHFLUID ON)
setSofaOption(PLUGIN_SOFAMISCCOLLISION ON)
setSofaOption(PLUGIN_SOFADISTANCEGRID ON)
setSofaOption(PLUGIN_SOFAIMPLICITFIELD ON)
setSofaOption(PLUGIN_SOFAVOLUMETRICDATA ON)
setSofaOption(PLUGIN_MULTITHREADING ON)
setSofaOption(PLUGIN_DIFFUSIONSOLVER ON)
setSofaOption(PLUGIN_IMAGE ON) # Depends on CImgPlugin, soft dependency to MultiThreading
setSofaOption(PLUGIN_COMPLIANT ON)
setSofaOption(PLUGIN_FLEXIBLE ON) # Depends on image, CImgPlugin, SofaPython
setSofaOption(PLUGIN_REGISTRATION ON)
setSofaOption(PLUGIN_PREASSEMBLEDMASS ON) # Depends on Flexible and Compliant
setSofaOption(PLUGIN_EXTERNALBEHAVIORMODEL ON)
setSofaOption(PLUGIN_INVERTIBLEFVM ON)
setSofaOption(PLUGIN_MANIFOLDTOPOLOGIES ON)
setSofaOption(PLUGIN_MANUALMAPPING ON)
setSofaOption(PLUGIN_THMPGSPATIALHASHING ON)
setSofaOption(PLUGIN_SOFACARVING ON)
setSofaOption(PLUGIN_RIGIDSCALE ON)
#setSofaOption(PLUGIN_VOLUMETRICRENDERING ON)
message("-----------------------------------------")