Skip to content

Commit

Permalink
Require YCM and newer YARP, bump CMake to 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBowman committed Jun 19, 2018
1 parent 4c43fe4 commit 3997ace
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 130 deletions.
43 changes: 31 additions & 12 deletions CMakeLists.txt
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)
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.

0 comments on commit 3997ace

Please sign in to comment.