Skip to content

Commit

Permalink
Require YCM and newer YARP, bump to CMake 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Jun 18, 2018
1 parent 20d5aed commit c1c5234
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 136 deletions.
30 changes: 14 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,42 +1,40 @@
cmake_minimum_required(VERSION 2.8.9)
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

# Define a project.
project(AMOR_OPENRAVE_MODELS)
project(AMOR_OPENRAVE_MODELS LANGUAGES NONE)

# Load custom CMake modules.
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
# Find dependencies
find_package(YCM 0.8 REQUIRED)

# Find YARP and load configuration, fail otherwise.
find_package(YARP REQUIRED)

# Make YARP's modules visible to current CMake file.
list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH})

# Load yarp_configure_external_installation() and yarp_install().
include(YarpInstallationHelpers)
# https://github.com/roboticslab-uc3m/questions-and-answers/issues/65
find_package(YARP 3.0 QUIET)
if(NOT YARP_FOUND)
find_package(YARP 2.3.70 REQUIRED)
endif()

# Set some useful variables - paths relative to the installation prefix.
yarp_configure_external_installation(amor)

set(models_dir openrave)

# Configure install rule, copy models to the build directory.
yarp_install(DIRECTORY openrave DESTINATION ${AMOR_CONTEXTS_INSTALL_DIR})
yarp_install(DIRECTORY openrave
DESTINATION ${AMOR_CONTEXTS_INSTALL_DIR})

# Store this package in the user registry.
export(PACKAGE AMOR_OPENRAVE_MODELS)

# Define CMAKE_INSTALL_<dir> and CMAKE_INSTALL_FULL_<dir> variables.
include(GNUInstallDirs)

# Set installation path for CMake files.
if(WIN32)
set(AMOR_OPENRAVE_MODELS_CMAKE_DESTINATION "CMake")
else()
set(AMOR_OPENRAVE_MODELS_CMAKE_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/AMOR_OPENRAVE_MODELS")
endif()

# Create dummy CMake configuration export file.
file(WRITE ${CMAKE_BINARY_DIR}/AMOR_OPENRAVE_MODELSConfig.cmake "# Dummy CMake configuration export file.")
file(WRITE ${CMAKE_BINARY_DIR}/AMOR_OPENRAVE_MODELSConfig.cmake
"# Dummy CMake configuration export file.")

# Install CMake configuration file.
install(FILES ${CMAKE_BINARY_DIR}/AMOR_OPENRAVE_MODELSConfig.cmake
Expand Down
70 changes: 0 additions & 70 deletions cmake/AddUninstallTarget.cmake

This file was deleted.

48 changes: 0 additions & 48 deletions cmake/Copyright.txt

This file was deleted.

5 changes: 3 additions & 2 deletions doc/amor-openrave-models-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

Dependencies:

- [Install CMake](https://github.com/roboticslab-uc3m/installation-guides/blob/develop/install-cmake.md)
- [Install YARP](https://github.com/roboticslab-uc3m/installation-guides/blob/develop/install-yarp.md) (CMake modules)
- [Install CMake 3.5+](https://github.com/roboticslab-uc3m/installation-guides/blob/develop/install-cmake.md)
- [Install YCM 0.8+](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-ycm.md)
- [Install YARP 2.3.70+](https://github.com/roboticslab-uc3m/installation-guides/blob/develop/install-yarp.md) (CMake modules)

Installation steps:

Expand Down

0 comments on commit c1c5234

Please sign in to comment.