Skip to content
Snippets Groups Projects
Commit 0cd005ef authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] use exports

parent 72c0927d
No related branches found
No related tags found
No related merge requests found
#
# Copyright (c) 2014 CNRS
# Authors: Florent Lamiraux
# Copyright (c) 2014, 2020 CNRS
# Authors: Florent Lamiraux, Guilhem Saurel
#
#
# This file is part of hpp_tutorial
......@@ -17,12 +17,14 @@
# hpp_tutorial If not, see
# <http://www.gnu.org/licenses/>.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
SET(PROJECT_NAME hpp_tutorial)
SET(PROJECT_DESCRIPTION "Tutorial for humanoid path planner platform.")
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
SET(CXX_DISABLE_WERROR TRUE)
INCLUDE(cmake/hpp.cmake)
INCLUDE(cmake/python.cmake)
......@@ -31,9 +33,7 @@ PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
FINDPYTHON()
ADD_DOC_DEPENDENCY("hpp-core >= 4")
ADD_DOC_DEPENDENCY("hpp-corbaserver >= 4")
ADD_REQUIRED_DEPENDENCY("hpp-manipulation-corba >= 4")
ADD_PROJECT_DEPENDENCY("hpp-manipulation-corba" REQUIRED)
ADD_SUBDIRECTORY(src)
......@@ -95,3 +95,6 @@ IF(INSTALL_DOCUMENTATION)
${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}/doxygen-html/script
)
ENDIF(INSTALL_DOCUMENTATION)
ADD_LIBRARY(${PROJECT_NAME} INTERFACE)
INSTALL(TARGETS ${PROJECT_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION lib)
Subproject commit 7eca9ee6c9d1c4ee20eb82272e94f9d11642053a
Subproject commit 7ab756beff8729739c45731dfc1edb6f88d2dbc8
#
# Copyright (c) 2019 CNRS
# Authors: Joseph Mirabel
# Copyright (c) 2019, 2020 CNRS
# Authors: Joseph Mirabel, Guilhem Saurel
#
#
# This file is part of hpp_tutorial
......@@ -21,23 +21,19 @@
### Tutorial 1
# Create and install executable running the corba server
ADD_EXECUTABLE (hpp-tutorial-1
tutorial_1.cc
)
ADD_EXECUTABLE(hpp-tutorial-1 tutorial_1.cc)
# Link executable with hpp-corbaserver library
PKG_CONFIG_USE_DEPENDENCY (hpp-tutorial-1 hpp-core)
TARGET_LINK_LIBRARIES(hpp-tutorial-1 hpp-core::hpp-core)
# Install executable
INSTALL (TARGETS hpp-tutorial-1 DESTINATION ${CMAKE_INSTALL_BINDIR})
INSTALL(TARGETS hpp-tutorial-1 DESTINATION ${CMAKE_INSTALL_BINDIR})
### Tutorial 2
# Create and install executable running the corba server
ADD_EXECUTABLE (hpp-tutorial-2-server
tutorial_2.cc
)
ADD_EXECUTABLE(hpp-tutorial-2-server tutorial_2.cc)
# Link executable with hpp-corbaserver library
PKG_CONFIG_USE_DEPENDENCY (hpp-tutorial-2-server hpp-corbaserver)
TARGET_LINK_LIBRARIES(hpp-tutorial-2-server hpp-corbaserver::hpp-corbaserver)
# Install executable
INSTALL (TARGETS hpp-tutorial-2-server DESTINATION ${CMAKE_INSTALL_BINDIR})
INSTALL(TARGETS hpp-tutorial-2-server DESTINATION ${CMAKE_INSTALL_BINDIR})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment