Commit 0a92b4b9 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] clean: keep minimal required instructions

parent bf0712f1
......@@ -3,117 +3,188 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
# Project properties
SET(PROJECT_ORG stack-of-tasks)
SET(PROJECT_NAME sot-core)
SET(PROJECT_DESCRIPTION "Hierarchical task solver plug-in for dynamic-graph.")
SET(PROJECT_URL "http://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
SET(PROJECT_URL "https://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
OPTION(BUILD_PYTHON_INTERFACE "Build the python binding" ON)
OPTION(INSTALL_PYTHON_INTERFACE_ONLY "Install *ONLY* the python binding" OFF)
OPTION(SUFFIX_SO_VERSION
"Suffix shared library name by a string depending on git status of project"
ON)
# Project options
OPTION(BUILD_PYTHON_INTERFACE "Build the python bindings" ON)
OPTION(INSTALL_PYTHON_INTERFACE_ONLY "Install *ONLY* the python bindings" OFF)
OPTION(SUFFIX_SO_VERSION "Suffix library name with its version" ON)
# Project configuration
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
# Export CMake Target
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
SET(CUSTOM_HEADER_DIR "sot/core")
SET(CXX_DISABLE_WERROR TRUE)
SET(DOXYGEN_USE_MATHJAX YES)
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
# JRL-cmakemodule setup
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/python.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/python.cmake)
INCLUDE(cmake/sphinx.cmake)
# Specify the project.
# Project definition
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
SET(BOOST_COMPONENTS filesystem system thread program_options unit_test_framework)
# Project dependencies
ADD_PROJECT_DEPENDENCY(dynamic-graph REQUIRED PKG_CONFIG_REQUIRES dynamic-graph)
ADD_PROJECT_DEPENDENCY(pinocchio REQUIRED PKG_CONFIG_REQUIRES pinocchio)
SET(BOOST_COMPONENTS filesystem system thread program_options
unit_test_framework regex)
IF(BUILD_PYTHON_INTERFACE)
FINDPYTHON()
STRING(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
SET(${PY_NAME}_INSTALL_DIR ${PYTHON_SITELIB}/${PY_NAME})
INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS})
SET(PYTHON_INSTALL_DIR
${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}/dynamic_graph/sot/core)
ADD_PROJECT_DEPENDENCY(dynamic-graph-python 3.0.0 REQUIRED PKG_CONFIG_REQUIRES "dynamic-graph-python >= 3.0.0")
STRING(REGEX REPLACE "-" "_" PYTHON_DIR ${CUSTOM_HEADER_DIR})
ADD_PROJECT_DEPENDENCY(dynamic-graph-python REQUIRED
PKG_CONFIG_REQUIRES dynamic-graph-python)
SET(BOOST_COMPONENTS ${BOOST_COMPONENTS} python)
ENDIF(BUILD_PYTHON_INTERFACE)
SEARCH_FOR_BOOST()
ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES eigen3)
SET(DOXYGEN_USE_MATHJAX YES)
# Verbosity level
IF(NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
ADD_DEFINITIONS(-DVP_DEBUG_MODE=${CMAKE_VERBOSITY_LEVEL} -DVP_DEBUG)
ENDIF(NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
# Main Library
SET(${PROJECT_NAME}_HEADERS
include/${CUSTOM_HEADER_DIR}/abstract-sot-external-interface.hh
include/${CUSTOM_HEADER_DIR}/additional-functions.hh
include/${CUSTOM_HEADER_DIR}/api.hh
include/${CUSTOM_HEADER_DIR}/binary-int-to-uint.hh
include/${CUSTOM_HEADER_DIR}/binary-op.hh
include/${CUSTOM_HEADER_DIR}/causal-filter.hh
include/${CUSTOM_HEADER_DIR}/clamp-workspace.hh
include/${CUSTOM_HEADER_DIR}/com-freezer.hh
include/${CUSTOM_HEADER_DIR}/contiifstream.hh
include/${CUSTOM_HEADER_DIR}/debug.hh
include/${CUSTOM_HEADER_DIR}/derivator.hh
include/${CUSTOM_HEADER_DIR}/device.hh
include/${CUSTOM_HEADER_DIR}/double-constant.hh
include/${CUSTOM_HEADER_DIR}/event.hh
include/${CUSTOM_HEADER_DIR}/exception-abstract.hh
include/${CUSTOM_HEADER_DIR}/exception-dynamic.hh
include/${CUSTOM_HEADER_DIR}/exception-factory.hh
include/${CUSTOM_HEADER_DIR}/exception-feature.hh
include/${CUSTOM_HEADER_DIR}/exception-signal.hh
include/${CUSTOM_HEADER_DIR}/exception-task.hh
include/${CUSTOM_HEADER_DIR}/exception-tools.hh
include/${CUSTOM_HEADER_DIR}/exp-moving-avg.hh
include/${CUSTOM_HEADER_DIR}/factory.hh
include/${CUSTOM_HEADER_DIR}/feature-1d.hh
include/${CUSTOM_HEADER_DIR}/feature-abstract.hh
include/${CUSTOM_HEADER_DIR}/feature-generic.hh
include/${CUSTOM_HEADER_DIR}/feature-joint-limits.hh
include/${CUSTOM_HEADER_DIR}/feature-line-distance.hh
include/${CUSTOM_HEADER_DIR}/feature-point6d-relative.hh
include/${CUSTOM_HEADER_DIR}/feature-point6d.hh
include/${CUSTOM_HEADER_DIR}/feature-pose.hh
include/${CUSTOM_HEADER_DIR}/feature-posture.hh
include/${CUSTOM_HEADER_DIR}/feature-task.hh
include/${CUSTOM_HEADER_DIR}/feature-vector3.hh
include/${CUSTOM_HEADER_DIR}/feature-visual-point.hh
include/${CUSTOM_HEADER_DIR}/filter-differentiator.hh
include/${CUSTOM_HEADER_DIR}/fir-filter.hh
include/${CUSTOM_HEADER_DIR}/flags.hh
include/${CUSTOM_HEADER_DIR}/gain-adaptive.hh
include/${CUSTOM_HEADER_DIR}/gain-hyperbolic.hh
include/${CUSTOM_HEADER_DIR}/gripper-control.hh
include/${CUSTOM_HEADER_DIR}/integrator-abstract.hh
include/${CUSTOM_HEADER_DIR}/integrator-euler.hh
include/${CUSTOM_HEADER_DIR}/joint-limitator.hh
include/${CUSTOM_HEADER_DIR}/kalman.hh
include/${CUSTOM_HEADER_DIR}/latch.hh
include/${CUSTOM_HEADER_DIR}/macros-signal.hh
include/${CUSTOM_HEADER_DIR}/mailbox-vector.hh
include/${CUSTOM_HEADER_DIR}/mailbox.hh
include/${CUSTOM_HEADER_DIR}/mailbox.hxx
include/${CUSTOM_HEADER_DIR}/matrix-constant.hh
include/${CUSTOM_HEADER_DIR}/matrix-geometry.hh
include/${CUSTOM_HEADER_DIR}/matrix-svd.hh
include/${CUSTOM_HEADER_DIR}/memory-task-sot.hh
include/${CUSTOM_HEADER_DIR}/motion-period.hh
include/${CUSTOM_HEADER_DIR}/multi-bound.hh
include/${CUSTOM_HEADER_DIR}/neck-limitation.hh
include/${CUSTOM_HEADER_DIR}/op-point-modifier.hh
include/${CUSTOM_HEADER_DIR}/parameter-server.hh
include/${CUSTOM_HEADER_DIR}/periodic-call.hh
include/${CUSTOM_HEADER_DIR}/periodic-call-entity.hh
include/${CUSTOM_HEADER_DIR}/pool.hh
include/${CUSTOM_HEADER_DIR}/reader.hh
include/${CUSTOM_HEADER_DIR}/robot-simu.hh
include/${CUSTOM_HEADER_DIR}/robot-utils.hh
include/${CUSTOM_HEADER_DIR}/sot.hh
include/${CUSTOM_HEADER_DIR}/stop-watch.hh
include/${CUSTOM_HEADER_DIR}/switch.hh
include/${CUSTOM_HEADER_DIR}/task.hh
include/${CUSTOM_HEADER_DIR}/task-abstract.hh
include/${CUSTOM_HEADER_DIR}/task-conti.hh
include/${CUSTOM_HEADER_DIR}/task-pd.hh
include/${CUSTOM_HEADER_DIR}/task-unilateral.hh
include/${CUSTOM_HEADER_DIR}/time-stamp.hh
include/${CUSTOM_HEADER_DIR}/timer.hh
include/${CUSTOM_HEADER_DIR}/trajectory.hh
include/${CUSTOM_HEADER_DIR}/unary-op.hh
include/${CUSTOM_HEADER_DIR}/utils-windows.hh
include/${CUSTOM_HEADER_DIR}/variadic-op.hh
include/${CUSTOM_HEADER_DIR}/vector-constant.hh
include/${CUSTOM_HEADER_DIR}/vector-to-rotation.hh
include/${CUSTOM_HEADER_DIR}/visual-point-projecter.hh
)
SET(PKG_CONFIG_ADDITIONAL_VARIABLES
${PKG_CONFIG_ADDITIONAL_VARIABLES}
plugindirname
plugindir
SET(${PROJECT_NAME}_SOURCES
src/debug/debug.cpp
src/debug/contiifstream.cpp
src/exception/exception-abstract.cpp
src/exception/exception-dynamic.cpp
src/exception/exception-factory.cpp
src/exception/exception-feature.cpp
src/exception/exception-signal.cpp
src/exception/exception-task.cpp
src/exception/exception-tools.cpp
src/signal/signal-cast.cpp
src/feature/feature-abstract.cpp
src/task/task-abstract.cpp
src/task/multi-bound.cpp
src/sot/flags.cpp
src/sot/memory-task-sot.cpp
src/factory/pool.cpp
src/tools/utils-windows
src/tools/periodic-call
src/tools/device
src/tools/trajectory
src/tools/robot-utils
src/matrix/matrix-svd
src/filters/causal-filter
src/utils/stop-watch
)
# Specific to PKG module
# FIXME: to be changed into lib/dynamic-graph
# to avoid name collision when installing dynamic-graph in /usr.
SET(PLUGINDIR "${CMAKE_INSTALL_FULL_LIBDIR}/plugin")
ADD_LIBRARY(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Boost_LIBRARIES}
dynamic-graph::dynamic-graph pinocchio::pinocchio)
IF(SUFFIX_SO_VERSION)
SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
ENDIF(SUFFIX_SO_VERSION)
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
# Extra macros for sot-core
install(FILES "src/sot-coreMacros.cmake"
DESTINATION "${CONFIG_INSTALL_DIR}")
INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
set(PACKAGE_EXTRA_MACROS "${PACKAGE_EXTRA_MACROS}
include(\"\${CMAKE_CURRENT_LIST_DIR}/sot-coreMacros.cmake\")")
PKG_CONFIG_APPEND_LIBS("sot-core")
# Search for dependencies.
# Boost
SET(BOOST_COMPONENTS
thread filesystem program_options
unit_test_framework system regex )
ADD_PROJECT_DEPENDENCY(dynamic-graph REQUIRED PKG_CONFIG_REQUIRES dynamic-graph)
ADD_PROJECT_DEPENDENCY(pinocchio 2.3.1 REQUIRED PKG_CONFIG_REQUIRES "pinocchio >= 2.3.1")
SEARCH_FOR_BOOST()
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(unitTesting)
#ADD_SUBDIRECTORY(doc)
ADD_SUBDIRECTORY(doc)
# **********************************
# Robot_utils_sot_py PYTHON module *
# **********************************
IF(BUILD_PYTHON_INTERFACE)
IF(NOT CMAKE_VERSION VERSION_LESS "3.12" AND NOT WIN32)
Python_add_library(robot_utils_sot_py MODULE src/tools/robot-utils-py.cpp)
ELSE(NOT CMAKE_VERSION VERSION_LESS "3.12" AND NOT WIN32)
PYTHON_ADD_MODULE(robot_utils_sot_py src/tools/robot-utils-py.cpp)
ENDIF()
TARGET_LINK_LIBRARIES(robot_utils_sot_py
${Boost_LIBRARIES}
${PYTHON_LIBRARIES} ${LIBRARY_NAME}
dynamic-graph::dynamic-graph
pinocchio::pinocchio
)
TARGET_INCLUDE_DIRECTORIES(robot_utils_sot_py PUBLIC pinocchio::pinocchio)
TARGET_LINK_BOOST_PYTHON(robot_utils_sot_py)
INSTALL(TARGETS robot_utils_sot_py DESTINATION ${PYTHON_INSTALL_DIR})
ENDIF(BUILD_PYTHON_INTERFACE)
# We do not want the project to be finalized if this is
# to install only the python interface.
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
SETUP_PROJECT_PACKAGE_FINALIZE()
INSTALL(FILES package.xml DESTINATION share/${PROJECT_NAME})
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
get_cmake_property(_variableNames VARIABLES)
list(SORT _variableNames)
foreach(_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
Subproject commit 4514454f5f9462047b5c29f61b6c3e0db731c416
Subproject commit 321eb1ccf1d94570eb564f3659b13ef3ef82239e
......@@ -6,7 +6,6 @@
# get the python script install path
IF(BUILD_PYTHON_INTERFACE)
INCLUDE(../cmake/sphinx.cmake)
SPHINX_SETUP()
SPHINX_FINALIZE()
IF(INSTALL_DOCUMENTATION)
......
# Copyright 2010, François Bleibel, Olivier Stasse, JRL, CNRS/AIST
SET(NEWHEADERS
sot/core/abstract-sot-external-interface.hh
sot/core/additional-functions.hh
sot/core/api.hh
sot/core/binary-int-to-uint.hh
sot/core/binary-op.hh
sot/core/causal-filter.hh
sot/core/clamp-workspace.hh
sot/core/com-freezer.hh
sot/core/contiifstream.hh
sot/core/debug.hh
sot/core/derivator.hh
sot/core/device.hh
sot/core/double-constant.hh
sot/core/event.hh
sot/core/exception-abstract.hh
sot/core/exception-dynamic.hh
sot/core/exception-factory.hh
sot/core/exception-feature.hh
sot/core/exception-signal.hh
sot/core/exception-task.hh
sot/core/exception-tools.hh
sot/core/exp-moving-avg.hh
sot/core/factory.hh
sot/core/feature-1d.hh
sot/core/feature-abstract.hh
sot/core/feature-generic.hh
sot/core/feature-joint-limits.hh
sot/core/feature-line-distance.hh
sot/core/feature-point6d-relative.hh
sot/core/feature-point6d.hh
sot/core/feature-pose.hh
sot/core/feature-posture.hh
sot/core/feature-task.hh
sot/core/feature-vector3.hh
sot/core/feature-visual-point.hh
sot/core/filter-differentiator.hh
sot/core/fir-filter.hh
sot/core/flags.hh
sot/core/gain-adaptive.hh
sot/core/gain-hyperbolic.hh
sot/core/gripper-control.hh
sot/core/integrator-abstract.hh
sot/core/integrator-euler.hh
sot/core/joint-limitator.hh
sot/core/kalman.hh
sot/core/latch.hh
sot/core/macros-signal.hh
sot/core/mailbox-vector.hh
sot/core/mailbox.hh
sot/core/mailbox.hxx
sot/core/matrix-constant.hh
sot/core/matrix-geometry.hh
sot/core/matrix-svd.hh
sot/core/memory-task-sot.hh
sot/core/motion-period.hh
sot/core/multi-bound.hh
sot/core/neck-limitation.hh
sot/core/op-point-modifier.hh
sot/core/parameter-server.hh
sot/core/periodic-call.hh
sot/core/periodic-call-entity.hh
sot/core/pool.hh
sot/core/reader.hh
sot/core/robot-simu.hh
sot/core/robot-utils.hh
sot/core/sot.hh
sot/core/stop-watch.hh
sot/core/switch.hh
sot/core/task.hh
sot/core/task-abstract.hh
sot/core/task-conti.hh
sot/core/task-pd.hh
sot/core/task-unilateral.hh
sot/core/time-stamp.hh
sot/core/timer.hh
sot/core/trajectory.hh
sot/core/unary-op.hh
sot/core/utils-windows.hh
sot/core/variadic-op.hh
sot/core/vector-constant.hh
sot/core/vector-to-rotation.hh
sot/core/visual-point-projecter.hh
)
IF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
INSTALL(FILES ${NEWHEADERS}
DESTINATION include/sot/core
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE
)
ENDIF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
# Copyright 2010, François Bleibel, Olivier Stasse, JRL, CNRS/AIST
# Copyright 2010, 2020, François Bleibel, Olivier Stasse, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
# Verbosity level
IF(NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
ADD_DEFINITIONS(-DVP_DEBUG_MODE=${CMAKE_VERBOSITY_LEVEL} -DVP_DEBUG)
ENDIF (NOT (\"${CMAKE_VERBOSITY_LEVEL}\" STREQUAL \"\"))
#define DEBUG=2 if we're building in debug mode (what for?)
IF("${CMAKE_BUILD_TYPE}" STREQUAL DEBUG)
ADD_DEFINITIONS(-DDEBUG=2)
ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL DEBUG)
IF(UNIX)
ADD_DEFINITIONS(-pthread)
ENDIF(UNIX)
# The main library name
SET(SOTCORE_LIB_NAME ${PROJECT_NAME})
#This project will create many plugins as shared libraries, listed here
SET(plugins
sot/sot
......@@ -83,7 +65,6 @@ SET(plugins
control/control-gr
control/control-pd
)
# TODO
......@@ -98,195 +79,84 @@ IF(WIN32)
)
ENDIF(WIN32)
set(ADDITIONAL_feature-task_LIBS feature-generic task)
set(ADDITIONAL_feature-point6d-relative_LIBS feature-point6d)
set(ADDITIONAL_sot_LIBS task)
set(ADDITIONAL_sequencer_LIBS sot)
set(ADDITIONAL_task-conti_LIBS task)
set(ADDITIONAL_task-pd_LIBS task)
set(ADDITIONAL_task-unilateral_LIBS task)
#Build sot-core
SET(LIBRARY_NAME ${SOTCORE_LIB_NAME})
#sot-core library sources
SET(${LIBRARY_NAME}_SOURCES
debug/debug.cpp
debug/contiifstream.cpp
exception/exception-abstract.cpp
exception/exception-dynamic.cpp
exception/exception-factory.cpp
exception/exception-feature.cpp
exception/exception-signal.cpp
exception/exception-task.cpp
exception/exception-tools.cpp
signal/signal-cast.cpp
feature/feature-abstract.cpp
task/task-abstract.cpp
task/multi-bound.cpp
sot/flags.cpp
sot/memory-task-sot.cpp
factory/pool.cpp
tools/utils-windows
tools/periodic-call
tools/device
tools/trajectory
tools/robot-utils
matrix/matrix-svd
filters/causal-filter
utils/stop-watch
)
set(feature-task_deps feature-generic task)
set(feature-point6d-relative_deps feature-point6d)
set(sot_deps task)
set(sequencer_deps sot)
set(task-conti_deps task)
set(task-pd_deps task)
set(task-unilateral_deps task)
ADD_LIBRARY(${LIBRARY_NAME}
SHARED
${${LIBRARY_NAME}_SOURCES})
target_include_directories(${LIBRARY_NAME}
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/>
INTERFACE
$<INSTALL_INTERFACE:include>
)
IF(SUFFIX_SO_VERSION)
SET_TARGET_PROPERTIES(${LIBRARY_NAME}
PROPERTIES
SOVERSION ${PROJECT_VERSION})
ENDIF()
target_link_libraries(${LIBRARY_NAME} dynamic-graph::dynamic-graph pinocchio::pinocchio ${Boost_LIBRARIES})
IF(UNIX)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${CMAKE_DL_LIBS})
ENDIF(UNIX)
IF(UNIX AND NOT APPLE)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} pthread)
ENDIF(UNIX AND NOT APPLE)
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
INSTALL(TARGETS ${LIBRARY_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
PUBLIC_HEADER
INCLUDES DESTINATION include
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
#Plugins compilation, link, and installation
#Compiles a plugin. The plugin library is ${LIBRARY_NAME}
FOREACH(plugin ${plugins})
#retrieve plugin name
GET_FILENAME_COMPONENT(LIBRARY_NAME ${plugin} NAME)
ADD_LIBRARY(${LIBRARY_NAME} SHARED ${plugin})
# only one source file per plugin
ADD_LIBRARY(${LIBRARY_NAME}
SHARED
${plugin}.cpp)
#remove the "lib" prefix from the plugin output name
SET_TARGET_PROPERTIES(${LIBRARY_NAME}
PROPERTIES
PREFIX ""
INSTALL_RPATH ${PLUGINDIR}
)
IF(${SUFFIX_SO_VERSION})
SET_TARGET_PROPERTIES(${LIBRARY_NAME}
PROPERTIES
SOVERSION ${PROJECT_VERSION}
)
ENDIF()
target_link_libraries(${LIBRARY_NAME}
${SOTCORE_LIB_NAME}
${Boost_LIBRARIES}
dynamic-graph::dynamic-graph
pinocchio::pinocchio)
IF(SUFFIX_SO_VERSION)
SET_TARGET_PROPERTIES(${LIBRARY_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION})
ENDIF(SUFFIX_SO_VERSION)
ADD_DEPENDENCIES(${LIBRARY_NAME} ${SOTCORE_LIB_NAME})
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${PROJECT_NAME} ${${LIBRARY_NAME}_deps})
IF(ADDITIONAL_${LIBRARY_NAME}_LIBS)
ADD_DEPENDENCIES(${LIBRARY_NAME} ${ADDITIONAL_${LIBRARY_NAME}_LIBS})
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${ADDITIONAL_${LIBRARY_NAME}_LIBS})
ENDIF(ADDITIONAL_${LIBRARY_NAME}_LIBS)
# Linux dynamic loading library flags
IF(UNIX)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${CMAKE_DL_LIBS})
ENDIF(UNIX)
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
INSTALL(TARGETS ${LIBRARY_NAME} EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION ${DYNAMIC_GRAPH_PLUGINDIR})
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
# build python submodule
IF(BUILD_PYTHON_INTERFACE)
STRING(REPLACE - _ PYTHON_LIBRARY_NAME ${LIBRARY_NAME})
DYNAMIC_GRAPH_PYTHON_MODULE("sot/core/${PYTHON_LIBRARY_NAME}"
${LIBRARY_NAME}
sot-core-${PYTHON_LIBRARY_NAME}-wrap
)
DYNAMIC_GRAPH_PYTHON_MODULE("${PYTHON_DIR}/${PYTHON_LIBRARY_NAME}"
${LIBRARY_NAME} ${PROJECT_NAME}-${PYTHON_LIBRARY_NAME}-wrap)
ENDIF(BUILD_PYTHON_INTERFACE)
IF (NOT INSTALL_PYTHON_INTERFACE_ONLY)
# Install plugins
INSTALL(TARGETS ${LIBRARY_NAME}
EXPORT ${TARGETS_EXPORT_NAME}
PUBLIC_HEADER
INCLUDES DESTINATION include
LIBRARY DESTINATION ${PLUGINDIR}
)
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
ENDFOREACH(plugin)
IF(BUILD_PYTHON_INTERFACE)
SET(NO_INSTALL_OF_INIT_PY 0)
DYNAMIC_GRAPH_PYTHON_MODULE("sot/core" ${SOTCORE_LIB_NAME} wrap
${NO_INSTALL_OF_INIT_PY})
# Install empty __init__.py files in intermediate directories.
DYNAMIC_GRAPH_PYTHON_MODULE(${PYTHON_DIR} ${PROJECT_NAME} wrap)
INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/__init__.py
DESTINATION ${PYTHON_SITELIB}/dynamic_graph/sot
DESTINATION ${PYTHON_SITELIB}/dynamic_graph/sot)
SET(${PROJECT_NAME}_PYTHON
__init__.py
math_small_entities.py
feature_position.py
feature_position_relative.py
matrix_util.py
meta_tasks.py
meta_task_6d.py
meta_tasks_kine.py
meta_tasks_kine_relative.py
meta_task_posture.py
meta_task_visual_point.py
)
INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/__init__.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/math_small_entities.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/feature_position.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/feature_position_relative.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/matrix_util.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/meta_tasks.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/meta_task_6d.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/meta_tasks_kine.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/meta_tasks_kine_relative.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/meta_task_posture.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/meta_task_visual_point.py
DESTINATION ${PYTHON_SITELIB}/dynamic_graph/sot/core
)
INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/utils/__init__.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/utils/attime.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/utils/history.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/utils/thread_interruptible_loop.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/utils/viewer_loger.py
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/core/utils/viewer_helper.py
DESTINATION ${PYTHON_SITELIB}/dynamic_graph/sot/core/utils
FOREACH(file ${${PROJECT_NAME}_PYTHON})
PYTHON_INSTALL_ON_SITE("dynamic_graph/${PYTHON_DIR}" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON})
SET(${PY_NAME}_PYTHON_UTILS
__init__.py
attime.py