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 22c963c commit 611f9ad
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 152 deletions.
43 changes: 33 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,48 @@
# Authors: Raul Fernandez-Fernandez, Juan G. Victores
# CopyPolicy: Released under the terms of the GNU GPL v2.0.

cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

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

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

add_subdirectory(openrave)
# 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(teo-openrave-models)

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

# Store this package in the user registry.
export(PACKAGE ${PROJECT_NAME})

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

if(WIN32 AND NOT CYGWIN)
set(_cmake_destination CMake)
# Set installation path for CMake files.
if(WIN32)
set(${PROJECT_NAME}_CMAKE_DESTINATION "CMake")
else()
set(_cmake_destination ${CMAKE_INSTALL_LIBDIR}/cmake/TEO_OPENRAVE_MODELS)
set(${PROJECT_NAME}_CMAKE_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
endif()

export(PACKAGE TEO_OPENRAVE_MODELS)
# Create dummy CMake configuration export file.
file(WRITE ${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake
"# Dummy CMake configuration export file.")

file(WRITE ${CMAKE_BINARY_DIR}/TEO_OPENRAVE_MODELSConfig.cmake "# Dummy CMake configuration export file.")
install(FILES ${CMAKE_BINARY_DIR}/TEO_OPENRAVE_MODELSConfig.cmake DESTINATION ${_cmake_destination})
# Install CMake configuration file.
install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake
DESTINATION ${${PROJECT_NAME}_CMAKE_DESTINATION})

# Add uninstall rule.
include(AddUninstallTarget)

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.

6 changes: 3 additions & 3 deletions doc/teo-openrave-models-install.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## teo-openrave-models: Installation from Source Code

First install the dependencies:
- [Install CMake](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-cmake.md)
- [Install OpenRAVE](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-openrave.md)

Additionally, this project depends on YCM to download and build external packages. Although this process is intended to run automatically during the CMake configuration phase, you may still want to install YCM and said packages by yourself. In that respect, refer to [Install YCM](https://github.com/roboticslab-uc3m/installation-guides/blob/master/install-ycm.md).
- [Install CMake 3.5+](https://github.com/roboticslab-uc3m/installation-guides/blob/master/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/master/install-yarp.md)

### Install the Models

Expand Down
21 changes: 0 additions & 21 deletions openrave/CMakeLists.txt

This file was deleted.

0 comments on commit 611f9ad

Please sign in to comment.