CMakeLists.txt 2.22 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
15
16
17
18
# Print initial message
MESSAGE("${PROJECT_DESCRIPTION}, version ${PROJECT_VERSION}")
MESSAGE("Copyright (C) 2018-2019 CNRS-LAAS")
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()

Guilhem Saurel's avatar
Guilhem Saurel committed
27
28
29

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

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

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

42
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
Carlos Mastalli's avatar
Carlos Mastalli committed
43
  INSTALL(DIRECTORY anymal_b_simple_description DESTINATION share/${PROJECT_NAME})
Guilhem Saurel's avatar
Guilhem Saurel committed
44
45
46
47
  INSTALL(DIRECTORY hyq_description DESTINATION share/${PROJECT_NAME})
  INSTALL(DIRECTORY solo_description DESTINATION share/${PROJECT_NAME})
  INSTALL(DIRECTORY icub_description DESTINATION share/${PROJECT_NAME})
  INSTALL(DIRECTORY talos_data DESTINATION share/${PROJECT_NAME})
48
  INSTALL(DIRECTORY kinova_description DESTINATION share/${PROJECT_NAME})
Guilhem Saurel's avatar
Guilhem Saurel committed
49
  INSTALL(DIRECTORY tiago_description DESTINATION share/${PROJECT_NAME})
Guilhem Saurel's avatar
Guilhem Saurel committed
50
  INSTALL(DIRECTORY ur_description DESTINATION share/${PROJECT_NAME})
Guilhem Saurel's avatar
Guilhem Saurel committed
51
  INSTALL(DIRECTORY romeo_description DESTINATION share/${PROJECT_NAME})
52
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)