Commit cb745285 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] Exports

parent 7260f145
#
# Copyright (c) 2016 CNRS
# Author: Anna Seppala
# Copyright (c) 2016, 2020 CNRS
# Author: Anna Seppala, Guilhem Saurel
#
#
# This file is part of hpp-model
......@@ -17,29 +17,43 @@
# hpp-model If not, see
# <http://www.gnu.org/licenses/>.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
SET(PROJECT_NAME hpp-affordance)
SET(PROJECT_DESCRIPTION "Implementation to Extract Whole-Body Affordances for Mutli-Contact Planning.")
SET(CXX_DISABLE_WERROR TRUE)
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
INCLUDE(cmake/hpp.cmake)
INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/eigen.cmake)
INCLUDE(cmake/test.cmake)
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
SEARCH_FOR_BOOST()
ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.2")
ADD_REQUIRED_DEPENDENCY("hpp-fcl >= 0.2.9")
ADD_PROJECT_DEPENDENCY(Eigen3)
ADD_PROJECT_DEPENDENCY(hpp-fcl)
SET(${PROJECT_NAME}_HEADERS
include/hpp/affordance/fwd.hh
include/hpp/affordance/affordance-extraction.hh
include/hpp/affordance/operations.hh
)
SET(${PROJECT_NAME}_SOURCES
src/affordance-extraction.cc
)
ADD_LIBRARY(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} SYSTEM PUBLIC ${EIGEN3_INCLUDE_DIR})
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} PUBLIC $<INSTALL_INTERFACE:include>)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} hpp-fcl::hpp-fcl)
INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)
ADD_SUBDIRECTORY(include/hpp/affordance)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tests)
CONFIG_FILES (include/hpp/affordance/doc.hh)
CONFIG_FILES(include/hpp/affordance/doc.hh)
PKG_CONFIG_APPEND_LIBS("hpp-affordance")
Subproject commit 7eca9ee6c9d1c4ee20eb82272e94f9d11642053a
Subproject commit 7ab756beff8729739c45731dfc1edb6f88d2dbc8
SET(${PROJECT_NAME}_HEADERS
fwd.hh
affordance-extraction.hh
operations.hh
)
INSTALL(FILES
${${PROJECT_NAME}_HEADERS}
DESTINATION include/hpp/affordance
)
# Copyright 2016, Anna Seppala, CNRS
#
# This file is part of hpp-affordance.
# hpp-affordance 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.
#
# hpp-affordance 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
# hpp-affordance. If not, see <http://www.gnu.org/licenses/>.
SET(LIBRARY_NAME ${PROJECT_NAME})
ADD_LIBRARY(${LIBRARY_NAME} SHARED affordance-extraction.cc)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-fcl)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} eigen3)
INSTALL(TARGETS ${LIBRARY_NAME} DESTINATION lib)
......@@ -28,7 +28,5 @@ SET(${PROJECT_NAME}_TESTS
FOREACH(test ${${PROJECT_NAME}_TESTS})
ADD_UNIT_TEST(${test} "test-${test}")
PKG_CONFIG_USE_DEPENDENCY(${test} hpp-fcl)
PKG_CONFIG_USE_DEPENDENCY(${test} eigen3)
target_link_libraries(${test} ${Boost_LIBRARIES} ${PROJECT_NAME})
ENDFOREACH(test)
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