diff --git a/CMakeLists.txt b/CMakeLists.txt
index bb00d25..55c623d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,27 +1,23 @@
-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)
@@ -29,6 +25,7 @@ export(PACKAGE AMOR_OPENRAVE_MODELS)
# Define CMAKE_INSTALL_
and CMAKE_INSTALL_FULL_ variables.
include(GNUInstallDirs)
+# Set installation path for CMake files.
if(WIN32)
set(AMOR_OPENRAVE_MODELS_CMAKE_DESTINATION "CMake")
else()
@@ -36,7 +33,8 @@ else()
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
diff --git a/cmake/AddUninstallTarget.cmake b/cmake/AddUninstallTarget.cmake
deleted file mode 100644
index fefef2d..0000000
--- a/cmake/AddUninstallTarget.cmake
+++ /dev/null
@@ -1,70 +0,0 @@
-#.rst:
-# AddUninstallTarget
-# ------------------
-#
-# Add the "uninstall" target for your project::
-#
-# include(AddUninstallTarget)
-#
-#
-# will create a file cmake_uninstall.cmake in the build directory and add a
-# custom target uninstall that will remove the files installed by your package
-# (using install_manifest.txt)
-
-#=============================================================================
-# Copyright 2008-2013 Kitware, Inc.
-# Copyright 2013 Istituto Italiano di Tecnologia (IIT)
-# Authors: Daniele E. Domenichelli
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
-
-
-if(DEFINED __ADD_UNINSTALL_TARGET_INCLUDED)
- return()
-endif()
-set(__ADD_UNINSTALL_TARGET_INCLUDED TRUE)
-
-
-set(_filename ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
-
-file(WRITE ${_filename}
-"if(NOT EXISTS \"${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt\")
- message(WARNING \"Cannot find install manifest: \\\"${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt\\\"\")
- return()
-endif()
-
-file(READ \"${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt\" files)
-string(STRIP \"\${files}\" files)
-string(REGEX REPLACE \"\\n\" \";\" files \"\${files}\")
-list(REVERSE files)
-foreach(file \${files})
- message(STATUS \"Uninstalling: \$ENV{DESTDIR}\${file}\")
- if(EXISTS \"\$ENV{DESTDIR}\${file}\")
- execute_process(
- COMMAND \${CMAKE_COMMAND} -E remove \"\$ENV{DESTDIR}\${file}\"
- OUTPUT_VARIABLE rm_out
- RESULT_VARIABLE rm_retval)
- if(NOT \"\${rm_retval}\" EQUAL 0)
- message(FATAL_ERROR \"Problem when removing \\\"\$ENV{DESTDIR}\${file}\\\"\")
- endif()
- else()
- message(STATUS \"File \\\"\$ENV{DESTDIR}\${file}\\\" does not exist.\")
- endif()
-endforeach(file)
-")
-
-if("${CMAKE_GENERATOR}" MATCHES "^(Visual Studio|Xcode)")
- set(_uninstall "UNINSTALL")
-else()
- set(_uninstall "uninstall")
-endif()
-add_custom_target(${_uninstall} COMMAND "${CMAKE_COMMAND}" -P "${_filename}")
-set_property(TARGET ${_uninstall} PROPERTY FOLDER "CMakePredefinedTargets")
diff --git a/cmake/Copyright.txt b/cmake/Copyright.txt
deleted file mode 100644
index b18e0aa..0000000
--- a/cmake/Copyright.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-YCM - Extra CMake Modules for YARP and friends
-Copyright 2013-2014 Istituto Italiano di Tecnologia (IIT)
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-* Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-* Neither the names of Istituto Italiano di Tecnologia (IIT),
- nor the names of their contributors may be used to endorse or promote
- products derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-------------------------------------------------------------------------------
-
-The above copyright and license notice applies to distributions of
-YCM in source and binary form. Some source files contain additional
-notices of original copyright by their contributors; see each source
-for details. Third-party software packages supplied with YCM under
-compatible licenses provide their own copyright notices documented in
-corresponding subdirectories.
-
-------------------------------------------------------------------------------
-
-YCM is being developed by the iCub Facility, Istituto Italiano di
-Tecnologia.
-
-Additional support to YCM was received from the FP7 EU project
-WALK-MAN (http://walk-man.eu/)
diff --git a/doc/amor-openrave-models-install.md b/doc/amor-openrave-models-install.md
index c93c166..9d3e39d 100644
--- a/doc/amor-openrave-models-install.md
+++ b/doc/amor-openrave-models-install.md
@@ -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: