-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
66 lines (54 loc) · 2.39 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
#========================================
# Create a library, its test executable
# and wrap the library into python using
# SWIG.
#
# JSN, simMACT project, 2024
#========================================
#--------------------------------------
# Generic statements
#--------------------------------------
# CMake requirement
cmake_minimum_required(VERSION 3.30)
# Project name
project(prjGravityForcesProcessor
VERSION 0.1
DESCRIPTION "Test project to access OpenSim's gravity force C++ features from Python thanks to SWIG"
LANGUAGES CXX)
# Because of OpenSim requirements
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#--------------------------------------
# Manage dependencies
#--------------------------------------
# Find Opensim
set(OpenSim_DIR "C:/OpenSim44/cmake")
find_package(OpenSim 4.4.0 REQUIRED)
#======================================
# Build the test executable
#======================================
#--- Create a target for an executable (for test purpose) ---
add_executable(exeGravForcesProcessor
TestGravForcesProcessor.cpp)
#--- Declare the sub-folder creating a target for the library with core features ---
add_subdirectory(GravForcesProcessor)
#--- Add include subdirectories ---
target_include_directories(exeGravForcesProcessor
PUBLIC
"${PROJECT_SOURCE_DIR}/GravForcesProcessor"
"${OpenSim_INCLUDE_DIRS}")
# DEBUG
#get_target_property(exe_inc_dir_list exeGravForcesProcessor INCLUDE_DIRECTORIES)
#message(STATUS "Liste des dossiers d'include pour la target 'exeGravForcesProcessor': ${exe_inc_dir_list}")
#--- Add link libraries ---
target_link_libraries(exeGravForcesProcessor
PUBLIC
libGravForcesProcessor
${OpenSim_LIBRARIES})
# DEBUG
#get_target_property(exe_lnk_lib_list exeGravForcesProcessor LINK_LIBRARIES)
#message(STATUS "Liste des librairies pour linker la target 'exeGravForcesProcessor': ${exe_lnk_lib_list}")
target_link_directories(exeGravForcesProcessor PUBLIC "${OpenSim_LIB_DIR}")
# DEBUG
#get_target_property(exe_lnk_dir_list exeGravForcesProcessor LINK_DIRECTORIES)
#message(STATUS "Liste des directories des libraries pour la target 'exeGravForcesProcessor': ${exe_lnk_dir_list}")