Commit 6bdbb5f0 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] Exports

parent dda9aa14
#
# Copyright (c) 2010, 2011 CNRS
# Authors: Florent Lamiraux, Joseph Mirabel
# Copyright (c) 2010, 2011, 2020 CNRS
# Authors: Florent Lamiraux, Joseph Mirabel, Guilhem Saurel
#
#
# This file is part of hpp-core
......@@ -17,26 +17,34 @@
# hpp-core If not, see
# <http://www.gnu.org/licenses/>.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
SET(CXX_DISABLE_WERROR TRUE)
SET(DOXYGEN_USE_MATHJAX YES)
SET(DOXYGEN_USE_TEMPLATE_CSS TRUE)
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
SET(PROJECT_NAME hpp-core)
SET(PROJECT_DESCRIPTION "Implement basic classes for canonical path planning for kinematic chains.")
INCLUDE(cmake/hpp.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/test.cmake)
SET(CMAKE_MODULE_PATH
${CMAKE_SOURCE_DIR}/cmake-modules/
${CMAKE_MODULE_PATH})
SET(DOXYGEN_USE_TEMPLATE_CSS TRUE)
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
ADD_PROJECT_DEPENDENCY(hpp-pinocchio)
ADD_PROJECT_DEPENDENCY(hpp-util)
ADD_PROJECT_DEPENDENCY(hpp-statistics)
ADD_PROJECT_DEPENDENCY(hpp-constraints)
SET(BOOST_COMPONENTS system timer unit_test_framework)
SEARCH_FOR_BOOST()
# Declare Headers
SET(${PROJECT_NAME}_HEADERS
include/hpp/core/basic-configuration-shooter.hh # DEPRECATED
......@@ -139,16 +147,118 @@ SET(${PROJECT_NAME}_HEADERS
include/hpp/core/time-parameterization/polynomial.hh
)
ADD_REQUIRED_DEPENDENCY("hpp-pinocchio >= 4")
ADD_REQUIRED_DEPENDENCY("hpp-util >= 3")
ADD_REQUIRED_DEPENDENCY("hpp-statistics >= 1.1")
ADD_REQUIRED_DEPENDENCY("hpp-constraints >= 4")
ADD_DOC_DEPENDENCY("pinocchio")
SET(${PROJECT_NAME}_SOURCES
src/astar.hh
src/bi-rrt-planner.cc
src/collision-validation.cc
src/configuration-shooter/uniform.cc
src/configuration-shooter/gaussian.cc
src/config-projector.cc
src/config-validations.cc
src/connected-component.cc
src/constraint.cc
src/constraint-set.cc
src/continuous-validation.cc
src/continuous-validation/body-pair-collision.cc
src/continuous-validation/dichotomy.cc
src/continuous-validation/solid-solid-collision.cc
src/continuous-validation/progressive.cc
src/diffusing-planner.cc
src/distance/reeds-shepp.cc
src/distance-between-objects.cc
src/dubins.hh
src/dubins.cc
src/dubins-path.cc
src/extracted-path.hh
src/interpolated-path.cc
src/joint-bound-validation.cc
src/obstacle-user.cc
src/path-validations.cc
src/path-validation/discretized.cc
src/path-validation/discretized-collision-checking.cc
src/path-validation/discretized-joint-bound.cc
src/path-validation/no-validation.hh
src/nearest-neighbor/basic.hh #
src/nearest-neighbor/basic.cc #
# src/nearest-neighbor/k-d-tree.cc #
# src/nearest-neighbor/k-d-tree.hh #
src/node.cc #
src/parameter.cc #
src/path.cc #
src/path-optimizer.cc #
src/path-optimization/linear-constraint.cc #
src/path-optimization/spline-gradient-based-abstract.cc #
src/path-optimization/partial-shortcut.cc #
src/path-optimization/random-shortcut.cc
src/path-optimization/simple-shortcut.cc
src/path-optimization/simple-time-parameterization.cc#
src/path-planner.cc #
src/path-planner/k-prm-star.cc
src/path-vector.cc #
src/path/spline.cc
src/path/hermite.cc
src/plan-and-optimize.cc #
src/plugin.cc # TODO : addObstacle
src/problem.cc # TODO : addObstacle
src/problem-solver.cc # TODO : addObstacle
src/path-projector.cc
src/path-projector/dichotomy.cc #
src/path-projector/global.cc #
src/path-projector/progressive.cc #
src/path-projector/recursive-hermite.cc
src/path-projector.cc #
src/parser/roadmap-factory.cc #
src/problem-target/goal-configurations.cc #
src/problem-target/task-target.cc #
src/reeds-shepp-path.cc
src/relative-motion.cc
src/kinodynamic-path.cc
src/kinodynamic-oriented-path.cc
src/steering-method/steering-kinodynamic.cc
src/roadmap.cc
src/steering-method/reeds-shepp.cc # TODO access type of joint
src/steering-method/car-like.cc
src/steering-method/constant-curvature.cc
src/steering-method/dubins.cc
src/steering-method/snibud.cc
src/steering-method/spline.cc
src/steering-method/straight.cc
src/straight-path.cc
src/interpolated-path.cc
src/visibility-prm-planner.cc
src/weighed-distance.cc
src/kinodynamic-distance.cc
src/path-projector/progressive.cc
src/path-projector/dichotomy.cc
src/path-projector/global.cc
src/path-projector.cc
src/parser/roadmap-factory.cc
src/problem-target/goal-configurations.cc
src/problem-target/task-target.cc
)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PRIVATE src)
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${CMAKE_DL_LIBS}
hpp-util::hpp-util pinocchio::pinocchio hpp-statistics::hpp-statistics hpp-constraints::hpp-constraints)
SET(BOOST_COMPONENTS system timer unit_test_framework)
SEARCH_FOR_BOOST()
INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)
# GPL licenced part
SET(${PROJECT_NAME}_HEADERS_GPL
src/path-optimization/spline-gradient-based/eiquadprog_2011.hpp
)
SET(${PROJECT_NAME}_HEADERS_GPL
src/path-optimization/quadratic-program.cc
src/path-optimization/spline-gradient-based.cc
)
ADD_LIBRARY(${PROJECT_NAME}-gpl SHARED ${${PROJECT_NAME}_SOURCES_GPL} ${${PROJECT_NAME}_HEADERS_GPL})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME}-gpl PRIVATE src)
TARGET_LINK_LIBRARIES(${PROJECT_NAME}-gpl ${PROJECT_NAME})
INSTALL(TARGETS ${PROJECT_NAME}-gpl EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(plugins)
ADD_SUBDIRECTORY(tests)
......@@ -160,7 +270,9 @@ IF(INSTALL_DOCUMENTATION)
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}/doxygen-html)
ENDIF(INSTALL_DOCUMENTATION)
SET(PKG_CONFIG_EXTRA "${PKG_CONFIG_EXTRA}\ncmake_plugin=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake/${PROJECT_NAME}-plugin.cmake")
SET(HPP_CORE_CMAKE_PLUGIN "${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}/${PROJECT_NAME}-plugin.cmake")
SET(PKG_CONFIG_EXTRA "${PKG_CONFIG_EXTRA}\ncmake_plugin=${HPP_CORE_CMAKE_PLUGIN}")
SET(PACKAGE_EXTRA_MACROS "set(HPP_CORE_CMAKE_PLUGIN ${HPP_CORE_CMAKE_PLUGIN})")
INSTALL(FILES cmake-modules/hpp-core-plugin.cmake
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/cmake/
DESTINATION lib/cmake/${PROJECT_NAME}
PERMISSIONS OWNER_READ GROUP_READ WORLD_READ OWNER_WRITE)
Subproject commit 4d08caf8ad25fd0073c0bed55207706659b6fb84
Subproject commit dcec7d7b7a358f3b638b033f6be13273a0d0c6b3
# Copyright (c) 2019, Joseph Mirabel
# Copyright (c) 2019, 2020 Joseph Mirabel, Guilhem Saurel, CNRS
# Authors: Joseph Mirabel (joseph.mirabel@laas.fr)
#
# This file is part of hpp-core.
......@@ -18,5 +18,4 @@ INCLUDE(hpp-core-plugin)
HPP_ADD_PLUGIN(spline-gradient-based
SOURCES spline-gradient-based.cc
LINK_DEPENDENCIES ${PROJECT_NAME} ${PROJECT_NAME}-gpl
PKG_CONFIG_DEPENDENCIES hpp-util hpp-pinocchio hpp-statistics hpp-constraints)
LINK_DEPENDENCIES ${PROJECT_NAME} ${PROJECT_NAME}-gpl)
......@@ -83,7 +83,7 @@ path-validation/no-validation.hh
problem-target/goal-configurations.cc #
problem-target/task-target.cc #
reeds-shepp-path.cc
relative-motion.cc
relative-motion.cc
kinodynamic-path.cc
kinodynamic-oriented-path.cc
steering-method/steering-kinodynamic.cc
......
# Copyright 2012, 2013, 2014 CNRS-LAAS
# Copyright 2012, 2013, 2014, 2020 CNRS-LAAS
#
# Author: Mathieu Geisert
# Author: Mathieu Geisert, Guilhem Saurel
#
# This file is part of hpp-core
# hpp-core is free software: you can redistribute it and/or modify
......@@ -15,9 +15,6 @@
# You should have received a copy of the GNU Lesser General Public License
# along with hpp-core If not, see <http://www.gnu.org/licenses/>.
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/src)
# Make Boost.Test generates the main function in test cases.
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
......@@ -43,14 +40,8 @@ MACRO(ADD_TESTCASE NAME GENERATED)
ELSE()
ADD_UNIT_TEST(${NAME} ${NAME}.cc)
ENDIF()
PKG_CONFIG_USE_DEPENDENCY(${NAME} hpp-util)
PKG_CONFIG_USE_DEPENDENCY(${NAME} hpp-pinocchio)
# Link against Boost and project library.
TARGET_LINK_LIBRARIES(${NAME}
${Boost_LIBRARIES} hpp-core hpp-core-gpl
)
TARGET_INCLUDE_DIRECTORIES(${NAME} PRIVATE ../src)
TARGET_LINK_LIBRARIES(${NAME} ${Boost_LIBRARIES} ${PROJECT_NAME}-gpl)
ENDMACRO(ADD_TESTCASE)
FIND_PACKAGE(OpenMP)
......
......@@ -19,7 +19,6 @@ SET_TARGET_PROPERTIES(example PROPERTIES PREFIX ""
#BUILD_WITH_INSTALL_RPATH TRUE
)
TARGET_LINK_LIBRARIES(example ${LIBRARY_NAME})
PKG_CONFIG_USE_DEPENDENCY(example hpp-pinocchio)
TARGET_LINK_LIBRARIES(example ${PROJECT_NAME})
#INSTALL(TARGETS example DESTINATION lib/hppPlugins)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment