-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require YCM and newer YARP, bump CMake to 3.5
- Loading branch information
1 parent
6246c67
commit bd042d3
Showing
3 changed files
with
30 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,48 @@ | ||
cmake_minimum_required(VERSION 2.6) | ||
cmake_minimum_required(VERSION 3.5 FATAL_ERROR) | ||
|
||
# Define a project. | ||
project(ROBOTICSLAB_INSTALLATION_GUIDES LANGUAGES NONE) | ||
|
||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) | ||
# Find dependencies | ||
find_package(YCM 0.8 REQUIRED) | ||
|
||
find_package(YARP REQUIRED) | ||
list(APPEND CMAKE_MODULE_PATH ${YARP_MODULE_PATH}) | ||
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(roboticslab-installation-guides) | ||
|
||
# Collect Markdown files. Globbing is evil, but we don't care. All we | ||
# need CMake here for is to support superbuild-like repos through YCM. | ||
file(GLOB md ${CMAKE_SOURCE_DIR}/*.md) | ||
yarp_install(FILES ${md} DESTINATION ${ROBOTICSLAB-INSTALLATION-GUIDES_CONTEXTS_INSTALL_DIR}) | ||
|
||
# Install files, create a copy in the local build tree. | ||
yarp_install(FILES ${md} | ||
DESTINATION ${ROBOTICSLAB-INSTALLATION-GUIDES_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) | ||
|
||
# Set installation path for CMake files. | ||
if(WIN32 AND NOT CYGWIN) | ||
set(_cmake_destination CMake) | ||
else() | ||
set(_cmake_destination ${CMAKE_INSTALL_LIBDIR}/cmake/ROBOTICSLAB_INSTALLATION_GUIDES) | ||
set(_cmake_destination ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) | ||
endif() | ||
|
||
export(PACKAGE ROBOTICSLAB_INSTALLATION_GUIDES) | ||
# 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}/ROBOTICSLAB_INSTALLATION_GUIDESConfig.cmake "# Dummy CMake configuration export file.") | ||
install(FILES ${CMAKE_BINARY_DIR}/ROBOTICSLAB_INSTALLATION_GUIDESConfig.cmake DESTINATION ${_cmake_destination}) | ||
# Install CMake configuration file. | ||
install(FILES ${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake | ||
DESTINATION ${_cmake_destination}) | ||
|
||
# Add uninstall rule. | ||
include(AddUninstallTarget) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.