-
Notifications
You must be signed in to change notification settings - Fork 0
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
4c43fe4
commit 3997ace
Showing
3 changed files
with
31 additions
and
130 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,31 +1,50 @@ | ||
cmake_minimum_required(VERSION 2.6) | ||
cmake_minimum_required(VERSION 3.5 FATAL_ERROR) | ||
|
||
# Define a project. | ||
project(TEO_DEVELOPER_MANUAL 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(teo-developer-manual) | ||
|
||
# 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) | ||
set(assets ${CMAKE_SOURCE_DIR}/assets) | ||
|
||
yarp_install(FILES ${md} DESTINATION ${TEO-DEVELOPER-MANUAL_CONTEXTS_INSTALL_DIR}) | ||
yarp_install(DIRECTORY ${assets} DESTINATION ${TEO-DEVELOPER-MANUAL_CONTEXTS_INSTALL_DIR}) | ||
# Install files, create a copy in the local build tree. | ||
yarp_install(FILES ${md} | ||
DESTINATION ${TEO-DEVELOPER-MANUAL_CONTEXTS_INSTALL_DIR}) | ||
yarp_install(DIRECTORY assets | ||
DESTINATION ${TEO-DEVELOPER-MANUAL_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/TEO_DEVELOPER_MANUAL) | ||
set(_cmake_destination ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) | ||
endif() | ||
|
||
export(PACKAGE TEO_DEVELOPER_MANUAL) | ||
# 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_DEVELOPER_MANUALConfig.cmake "# Dummy CMake configuration export file.") | ||
install(FILES ${CMAKE_BINARY_DIR}/TEO_DEVELOPER_MANUALConfig.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.