CMakeLists.txt 2.58 KB
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
Guilhem Saurel's avatar
Guilhem Saurel committed
2

3
# Set up project properties
Guilhem Saurel's avatar
Guilhem Saurel committed
4
SET(PROJECT_NAMESPACE gepetto)
Guilhem Saurel's avatar
Guilhem Saurel committed
5
6
SET(PROJECT_NAME example-robot-data)
SET(PROJECT_DESCRIPTION "Set of robot URDFs for benchmarking and developed examples.")
Guilhem Saurel's avatar
Guilhem Saurel committed
7
SET(PROJECT_URL https://gepgitlab.laas.fr/${PROJECT_NAMESPACE}/${PROJECT_NAME})
Guilhem Saurel's avatar
Guilhem Saurel committed
8

Guilhem Saurel's avatar
Guilhem Saurel committed
9
10
11
12
INCLUDE(cmake/base.cmake)
INCLUDE(cmake/test.cmake)
INCLUDE(cmake/python.cmake)

13
14
# Print initial message
MESSAGE("${PROJECT_DESCRIPTION}, version ${PROJECT_VERSION}")
15
MESSAGE("Copyright (C) 2018-2020 CNRS-LAAS / University of Edinburgh")
16
17
18
MESSAGE("All rights reserved.")
MESSAGE("Released under the BSD 3-Clause License.")

19
20
21
22
23
24
25
26
# Set a default build type to 'Release' if none was specified
IF(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
  MESSAGE(STATUS "Setting build type to 'Release' as none was specified.")
  SET(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
  # Set the possible values of build type for cmake-gui
  SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
ENDIF()

27
SET(CUSTOM_HEADER_DIR ${PROJECT_NAME})
Guilhem Saurel's avatar
Guilhem Saurel committed
28
29
30

CMAKE_POLICY(SET CMP0048 NEW)
PROJECT(${PROJECT_NAME} VERSION ${PROJECT_VERSION_FULL} LANGUAGES CXX)
Guilhem Saurel's avatar
Guilhem Saurel committed
31

32
OPTION (BUILD_PYTHON_INTERFACE "Build the python unit tests and helpers" ON)
33
OPTION (INSTALL_PYTHON_INTERFACE_ONLY "Install *ONLY* the python interface" OFF)
34

35
IF(BUILD_PYTHON_INTERFACE)
Guilhem Saurel's avatar
Guilhem Saurel committed
36
37
38
  ADD_REQUIRED_DEPENDENCY("pinocchio >= 2.1.0")
  FINDPYTHON()
  STRING(REGEX REPLACE "-" "_" PY_NAME ${PROJECT_NAME})
39
  ADD_SUBDIRECTORY(python)
Guilhem Saurel's avatar
Guilhem Saurel committed
40
  ADD_SUBDIRECTORY(unittest)
41
ENDIF(BUILD_PYTHON_INTERFACE)
42

43
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
44
45
46
47
48
49
50
51
52
53
54
  INSTALL(DIRECTORY robots/anymal_b_simple_description DESTINATION share/${PROJECT_NAME}/robots)
  INSTALL(DIRECTORY robots/hyq_description DESTINATION share/${PROJECT_NAME}/robots)
  INSTALL(DIRECTORY robots/solo_description DESTINATION share/${PROJECT_NAME}/robots)
  INSTALL(DIRECTORY robots/icub_description DESTINATION share/${PROJECT_NAME}/robots)
  INSTALL(DIRECTORY robots/talos_data DESTINATION share/${PROJECT_NAME}/robots)
  INSTALL(DIRECTORY robots/kinova_description DESTINATION share/${PROJECT_NAME}/robots)
  INSTALL(DIRECTORY robots/tiago_description DESTINATION share/${PROJECT_NAME}/robots)
  INSTALL(DIRECTORY robots/ur_description DESTINATION share/${PROJECT_NAME}/robots)
  INSTALL(DIRECTORY robots/romeo_description DESTINATION share/${PROJECT_NAME}/robots)
  INSTALL(DIRECTORY robots/hector_description DESTINATION share/${PROJECT_NAME}/robots)
  INSTALL(DIRECTORY robots/double_pendulum_description DESTINATION share/${PROJECT_NAME}/robots)
55
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)