"git@gitlab.laas.fr:gsaurel/talos-metapkg-ros-control-sot.git" did not exist on "787b13afb8ef9017ba2fc5e6fced20a3c58f45e3"
Newer
Older
# Copyright 2010, François Bleibel, Olivier Stasse, JRL, CNRS/AIST,
# Florent Lamiraux (CNRS/LAAS)
#
# This file is part of sot-dyninv.
# sot-dyninv is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# sot-dyninv is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# sot-dyninv. If not, see <http://www.gnu.org/licenses/>.
INCLUDE(../cmake/python.cmake)
IF(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
ADD_DEFINITIONS(-DDEBUG=2)
ENDIF(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
# --- HEADERS
FOREACH(header ${headers})
get_filename_component(headerName ${header} NAME)
set(src_path ${${PROJECT_NAME}_SOURCE_DIR}/src/${header})
set(bin_path ${${PROJECT_NAME}_BINARY_DIR}/include/${PROJECT_NAME}/${headerName})
set(install_path ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME})
execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${bin_path})
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${src_path} ${bin_path} )
install(FILES ${src_path} DESTINATION ${install_path}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE)
ENDFOREACH(header)
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/include)
INCLUDE_DIRECTORIES(${${PROJECT_NAME}_SOURCE_DIR}/include)
# --- COMPILATION OF PLUGINS
FOREACH(lib ${libs})
ADD_LIBRARY(${lib} SHARED ${lib}.cpp)
SET_TARGET_PROPERTIES(${lib} PROPERTIES
PREFIX ""
SOVERSION ${PROJECT_VERSION})
IF(${lib}_plugins_dependencies)
ADD_DEPENDENCIES(${lib} "${${lib}_plugins_dependencies}")
TARGET_LINK_LIBRARIES(${lib} "${${lib}_plugins_dependencies}")
ENDIF(${lib}_plugins_dependencies)
IF(${lib}_ext_plugins_dependencies)
TARGET_LINK_LIBRARIES(${lib} "${${lib}_ext_plugins_dependencies}")
ENDIF(${lib}_ext_plugins_dependencies)
PKG_CONFIG_USE_DEPENDENCY(${lib} sot-core)
PKG_CONFIG_USE_DEPENDENCY(${lib} dynamic-graph)
INSTALL(TARGETS ${lib} DESTINATION lib/plugin)
# build python submodule
STRING(REPLACE - _ PYTHON_LIBRARY_NAME ${lib})
FILE(MAKE_DIRECTORY dynamic_graph/sot/dyninv/${PYTHON_LIBRARY_NAME})
DYNAMIC_GRAPH_PYTHON_MODULE("sot/dyninv/${PYTHON_LIBRARY_NAME}"
${lib}
)
ENDFOREACH(lib)
# Install empty __init__.py files in intermediate directories.
INSTALL(FILES
${CMAKE_CURRENT_SOURCE_DIR}/dynamic_graph/sot/dyninv/__init__.py
DESTINATION ${PYTHON_SITELIB}/dynamic_graph/sot/dyninv
)