-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
70 lines (54 loc) · 3.09 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
64
65
66
67
68
69
70
cmake_minimum_required(VERSION 3.12)
project(SofaViscoElastic VERSION 1.0)
set(SOFAVISCOELASTIC_SOURCE_DIR src/SofaViscoElastic)
set(HEADER_FILES
${SOFAVISCOELASTIC_SOURCE_DIR}/config.h.in
${SOFAVISCOELASTIC_SOURCE_DIR}/init.h
${SOFAVISCOELASTIC_SOURCE_DIR}/TetrahedronViscoelasticityFEMDrawing.h
${SOFAVISCOELASTIC_SOURCE_DIR}/TetrahedronViscoelasticityFEMForceField.h
${SOFAVISCOELASTIC_SOURCE_DIR}/TetrahedronViscoelasticityFEMForceField.inl
${SOFAVISCOELASTIC_SOURCE_DIR}/TetrahedronViscoHyperelasticityFEMForceField.h
${SOFAVISCOELASTIC_SOURCE_DIR}/TetrahedronViscoHyperelasticityFEMForceField.inl
## VISCOELASTIC MATERIALS
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscoelastic/BaseViscoelasticMaterial.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscoelastic/MaxwellFirstOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscoelastic/MaxwellSecondOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscoelastic/SLSMaxwellSecondOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscoelastic/KelvinVoigtFirstOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscoelastic/KelvinVoigtSecondOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscoelastic/SLSKelvinVoigtSecondOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscoelastic/SLSKelvinVoigtFirstOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscoelastic/SLSMaxwellFirstOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscoelastic/Burgers.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscoelastic/LinearElastic.h
## VISCOHYPERELASTIC MATERIALS
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscohyperelastic/BaseViscoHyperelasticMaterial.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscohyperelastic/SLSNeoHookeanFirstOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscohyperelastic/SLSNeoHookeanSecondOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscohyperelastic/SLSStableNeoHookeanFirstOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscohyperelastic/SLSStableNeoHookeanSecondOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscohyperelastic/SLSMooneyRivlinFirstOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscohyperelastic/SLSMooneyRivlinSecondOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscohyperelastic/SLSOgdenFirstOrder.h
${SOFAVISCOELASTIC_SOURCE_DIR}/material/viscohyperelastic/SLSOgdenSecondOrder.h
)
set(SOURCE_FILES
${SOFAVISCOELASTIC_SOURCE_DIR}/init.cpp
${SOFAVISCOELASTIC_SOURCE_DIR}/TetrahedronViscoelasticityFEMForceField.cpp
${SOFAVISCOELASTIC_SOURCE_DIR}/TetrahedronViscoHyperelasticityFEMForceField.cpp
)
find_package(Sofa.Simulation.Core REQUIRED)
sofa_find_package(SofaPython3 QUIET)
add_library(${PROJECT_NAME} SHARED ${HEADER_FILES} ${SOURCE_FILES})
target_link_libraries(${PROJECT_NAME} PUBLIC Sofa.Simulation.Core )
sofa_create_package_with_targets(
PACKAGE_NAME ${PROJECT_NAME}
PACKAGE_VERSION ${Sofa_VERSION}
TARGETS ${PROJECT_NAME} AUTO_SET_TARGET_PROPERTIES
INCLUDE_SOURCE_DIR "src"
INCLUDE_INSTALL_DIR "${PROJECT_NAME}"
RELOCATABLE "plugins"
)
if(SofaPython3_FOUND)
add_subdirectory(Bindings)
endif()