-
Notifications
You must be signed in to change notification settings - Fork 14
/
CMakeLists.txt
53 lines (40 loc) · 2.59 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
if(NOT orocos_kdl_FOUND AND (NOT DEFINED ENABLE_ScrewTheoryLib OR ENABLE_ScrewTheoryLib))
message(WARNING "orocos_kdl package not found, disabling ScrewTheoryLib")
endif()
cmake_dependent_option(ENABLE_ScrewTheoryLib "Enable/disable ScrewTheoryLib library" ON
orocos_kdl_FOUND OFF)
if(ENABLE_ScrewTheoryLib)
add_library(ScrewTheoryLib SHARED ScrewTheoryTools.hpp
MatrixExponential.hpp
MatrixExponential.cpp
ProductOfExponentials.hpp
ProductOfExponentials.cpp
ScrewTheoryIkProblem.hpp
ScrewTheoryIkProblem.cpp
ScrewTheoryIkProblemBuilder.cpp
ScrewTheoryIkSubproblems.hpp
PadenKahanSubproblems.cpp
PardosGotorSubproblems.cpp
ConfigurationSelector.hpp
ConfigurationSelector.cpp
ConfigurationSelectorLeastOverallAngularDisplacement.cpp
ConfigurationSelectorHumanoidGait.cpp
LogComponent.hpp
LogComponent.cpp)
set_property(TARGET ScrewTheoryLib PROPERTY PUBLIC_HEADER MatrixExponential.hpp
ProductOfExponentials.hpp
ScrewTheoryIkProblem.hpp
ConfigurationSelector.hpp)
target_link_libraries(ScrewTheoryLib PUBLIC ${orocos_kdl_LIBRARIES}
PRIVATE YARP::YARP_os)
target_include_directories(ScrewTheoryLib PUBLIC ${orocos_kdl_INCLUDE_DIRS}
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
target_compile_features(ScrewTheoryLib PUBLIC cxx_std_17) # nested namespace definition
install(TARGETS ScrewTheoryLib
EXPORT ROBOTICSLAB_KINEMATICS_DYNAMICS)
set_property(GLOBAL APPEND PROPERTY _exported_dependencies orocos_kdl)
add_library(ROBOTICSLAB::ScrewTheoryLib ALIAS ScrewTheoryLib)
else()
set(ENABLE_ScrewTheoryLib OFF CACHE BOOL "Enable/disable ScrewTheoryLib library" FORCE)
endif()