Commit 4f62f50e authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] Export

parent 7b2b665d
# Copyright (c) 2012 CNRS # Copyright (c) 2012, 2020, CNRS
# Author: Florent Lamiraux # Authors: Florent Lamiraux, Guilhem Saurel
# #
# This file is part of hpp-rbprm-corba. # This file is part of hpp-rbprm-corba.
# hpp-rbprm-corba is free software: you can redistribute it # hpp-rbprm-corba is free software: you can redistribute it
...@@ -15,47 +15,35 @@ ...@@ -15,47 +15,35 @@
# hpp-rbprm-corba. If not, see # hpp-rbprm-corba. If not, see
# <http://www.gnu.org/licenses/>. # <http://www.gnu.org/licenses/>.
# Requires at least CMake 2.6 to configure the package. CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
SET(PROJECT_NAME hpp-rbprm-corba) SET(PROJECT_NAME hpp-rbprm-corba)
SET(PROJECT_DESCRIPTION "Corba server for reachability based planning") SET(PROJECT_DESCRIPTION "Corba server for reachability based planning")
SET(CUSTOM_HEADER_DIR hpp/corbaserver/rbprm)
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
SET(CXX_DISABLE_WERROR true) SET(CXX_DISABLE_WERROR true)
INCLUDE(cmake/hpp.cmake) INCLUDE(cmake/hpp.cmake)
INCLUDE(cmake/idl.cmake) INCLUDE(cmake/idl.cmake)
INCLUDE(cmake/python.cmake) INCLUDE(cmake/python.cmake)
# Set to 1 for profiling
#add_definitions(-DPROFILE)
SET(CUSTOM_HEADER_DIR hpp/corbaserver/rbprm)
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX) COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS}) PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
LIST(APPEND PKG_CONFIG_ADDITIONAL_VARIABLES cmake_plugin) LIST(APPEND PKG_CONFIG_ADDITIONAL_VARIABLES cmake_plugin)
SET(${PROJECT_NAME}_HEADERS
include/${CUSTOM_HEADER_DIR}/server.hh
)
FINDPYTHON() FINDPYTHON()
ADD_DOC_DEPENDENCY("hpp-core >= 4.3") ADD_PROJECT_DEPENDENCY("hpp-rbprm" REQUIRED)
ADD_REQUIRED_DEPENDENCY("hpp-corbaserver >= 4.3") ADD_PROJECT_DEPENDENCY("hpp-affordance-corba" REQUIRED)
ADD_REQUIRED_DEPENDENCY("hpp-rbprm >= 4.3")
ADD_REQUIRED_DEPENDENCY("omniORB4 >= 4.1.4") ADD_REQUIRED_DEPENDENCY("omniORB4 >= 4.1.4")
ADD_REQUIRED_DEPENDENCY("hpp-affordance-corba") ADD_REQUIRED_DEPENDENCY("octomap >= 1.8")
ADD_REQUIRED_DEPENDENCY("hpp-util >= 3")
ADD_REQUIRED_DEPENDENCY("hpp-pinocchio >= 4.3")
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/find-external/CDD") set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/find-external/CDD")
find_package(CDD REQUIRED) ADD_PROJECT_DEPENDENCY(CDD REQUIRED)
add_required_dependency("octomap >= 1.8") if(OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS)
if (OCTOMAP_INCLUDE_DIRS AND OCTOMAP_LIBRARY_DIRS)
include_directories(${OCTOMAP_INCLUDE_DIRS}) include_directories(${OCTOMAP_INCLUDE_DIRS})
link_directories(${OCTOMAP_LIBRARY_DIRS}) link_directories(${OCTOMAP_LIBRARY_DIRS})
string(REPLACE "." ";" VERSION_LIST ${OCTOMAP_VERSION}) string(REPLACE "." ";" VERSION_LIST ${OCTOMAP_VERSION})
...@@ -70,8 +58,22 @@ else() ...@@ -70,8 +58,22 @@ else()
message(STATUS "FCL does not use Octomap") message(STATUS "FCL does not use Octomap")
endif() endif()
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME}) SET(${PROJECT_NAME}_HEADERS
include/${CUSTOM_HEADER_DIR}/server.hh
)
SET(${PROJECT_NAME}_SOURCES
src/${PROJECT_NAME}.cc
)
# Stand alone corba server
ADD_EXECUTABLE(hpp-rbprm-server ${${PROJECT_NAME}_SOURCES} ${${PROJECT_NAME}_HEADERS})
TARGET_INCLUDE_DIRECTORIES(hpp-rbprm-server PUBLIC $<INSTALL_INTERFACE:include>)
TARGET_LINK_LIBRARIES(hpp-rbprm-server hpp-corbaserver::hpp-corbaserver)
INSTALL(TARGETS hpp-rbprm-server EXPORT ${TARGETS_EXPORT_NAME} DESTINATION bin)
ADD_SUBDIRECTORY(src) ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tests) ADD_SUBDIRECTORY(tests)
CONFIG_FILES (include/${CUSTOM_HEADER_DIR}/doc.hh) CONFIG_FILES (include/${CUSTOM_HEADER_DIR}/doc.hh)
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
Subproject commit 7eca9ee6c9d1c4ee20eb82272e94f9d11642053a Subproject commit 7ab756beff8729739c45731dfc1edb6f88d2dbc8
# Copyright (c) 2012 CNRS # Copyright (c) 2012, 2020, CNRS
# Author: Florent Lamiraux # Author: Florent Lamiraux, Guilhem Saurel
# #
# This file is part of hpp-rbprm-corba. # This file is part of hpp-rbprm-corba.
# hpp-rbprm-corba is free software: you can redistribute it # hpp-rbprm-corba is free software: you can redistribute it
...@@ -60,12 +60,12 @@ HPP_ADD_SERVER_PLUGIN(rbprm-corba ...@@ -60,12 +60,12 @@ HPP_ADD_SERVER_PLUGIN(rbprm-corba
rbprmbuilder.impl.hh rbprmbuilder.impl.hh
server.cc server.cc
LINK_DEPENDENCIES
hpp-rbprm::hpp-rbprm
hpp-corbaserver::hpp-corbaserver
PKG_CONFIG_DEPENDENCIES PKG_CONFIG_DEPENDENCIES
hpp-rbprm omniORB4)
hpp-corbaserver
omniORB4
hpp-util
hpp-rbprm)
ADD_CUSTOM_TARGET(generate_idl_cpp DEPENDS ${ALL_IDL_CPP_STUBS}) ADD_CUSTOM_TARGET(generate_idl_cpp DEPENDS ${ALL_IDL_CPP_STUBS})
ADD_CUSTOM_TARGET(generate_idl_python DEPENDS ${ALL_IDL_PYTHON_STUBS}) ADD_CUSTOM_TARGET(generate_idl_python DEPENDS ${ALL_IDL_PYTHON_STUBS})
...@@ -73,14 +73,6 @@ ADD_DEPENDENCIES (rbprm-corba generate_idl_cpp) ...@@ -73,14 +73,6 @@ ADD_DEPENDENCIES (rbprm-corba generate_idl_cpp)
ADD_DEPENDENCIES (rbprm-corba generate_idl_python) ADD_DEPENDENCIES (rbprm-corba generate_idl_python)
TARGET_INCLUDE_DIRECTORIES(rbprm-corba PUBLIC ${CDD_INCLUDE_DIRS}) TARGET_INCLUDE_DIRECTORIES(rbprm-corba PUBLIC ${CDD_INCLUDE_DIRS})
# Stand alone corba server
ADD_EXECUTABLE (hpp-rbprm-server hpp-rbprm-corba.cc)
PKG_CONFIG_USE_DEPENDENCY(hpp-rbprm-server hpp-corbaserver)
PKG_CONFIG_USE_DEPENDENCY(hpp-rbprm-server hpp-pinocchio)
INSTALL (TARGETS hpp-rbprm-server DESTINATION ${CMAKE_INSTALL_BINDIR})
SET(${PROJECT_NAME}_PYTHON_FILES SET(${PROJECT_NAME}_PYTHON_FILES
__init__.py __init__.py
__main__.py __main__.py
...@@ -114,7 +106,7 @@ SET(${PROJECT_NAME}_PYTHON_TOOLS ...@@ -114,7 +106,7 @@ SET(${PROJECT_NAME}_PYTHON_TOOLS
) )
SET(${PROJECT_NAME}_PYTHON_SCENARIOS SET(${PROJECT_NAME}_PYTHON_SCENARIOS
abstract_contact_generator.py abstract_contact_generator.py
abstract_path_planner.py abstract_path_planner.py
anymal_contact_generator.py anymal_contact_generator.py
anymal_path_planner.py anymal_path_planner.py
...@@ -147,7 +139,7 @@ SET(${PROJECT_NAME}_PYTHON_SCENARIOS_DEMOS ...@@ -147,7 +139,7 @@ SET(${PROJECT_NAME}_PYTHON_SCENARIOS_DEMOS
talos_navBauzil_obstacles.py talos_navBauzil_obstacles.py
talos_plateformes_path.py talos_plateformes_path.py
talos_plateformes.py talos_plateformes.py
talos_stairs10_path.py talos_stairs10_path.py
talos_stairs10.py talos_stairs10.py
) )
...@@ -184,12 +176,12 @@ SET(${PROJECT_NAME}_PYTHON_SCENARIOS_MEMMO ...@@ -184,12 +176,12 @@ SET(${PROJECT_NAME}_PYTHON_SCENARIOS_MEMMO
talos_stairs10_random.py talos_stairs10_random.py
) )
# Install python files : # Install python files :
FOREACH(file ${${PROJECT_NAME}_PYTHON_FILES}) FOREACH(file ${${PROJECT_NAME}_PYTHON_FILES})
PYTHON_INSTALL_ON_SITE("hpp/corbaserver/rbprm" ${file}) PYTHON_INSTALL_ON_SITE("hpp/corbaserver/rbprm" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_FILES}) ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_FILES})
# /tools # /tools
FOREACH(file ${${PROJECT_NAME}_PYTHON_TOOLS}) FOREACH(file ${${PROJECT_NAME}_PYTHON_TOOLS})
PYTHON_INSTALL_ON_SITE("hpp/corbaserver/rbprm/tools" ${file}) PYTHON_INSTALL_ON_SITE("hpp/corbaserver/rbprm/tools" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_TOOLS}) ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_TOOLS})
...@@ -208,8 +200,3 @@ ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS_DEMOS}) ...@@ -208,8 +200,3 @@ ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS_DEMOS})
FOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS_MEMMO}) FOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS_MEMMO})
PYTHON_INSTALL_ON_SITE("hpp/corbaserver/rbprm/scenarios/memmo" ${file}) PYTHON_INSTALL_ON_SITE("hpp/corbaserver/rbprm/scenarios/memmo" ${file})
ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS_MEMMO}) ENDFOREACH(file ${${PROJECT_NAME}_PYTHON_SCENARIOS_MEMMO})
Supports Markdown
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