CMakeLists.txt 1.87 KB
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
2
3
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)

INCLUDE(cmake/base.cmake)
Guilhem Saurel's avatar
Guilhem Saurel committed
4
INCLUDE(cmake/test.cmake)
5
INCLUDE(cmake/python.cmake)
Guilhem Saurel's avatar
Guilhem Saurel committed
6

7
# Set up project properties
Guilhem Saurel's avatar
Guilhem Saurel committed
8
SET(PROJECT_NAMESPACE gepetto)
Guilhem Saurel's avatar
Guilhem Saurel committed
9
10
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
11
SET(PROJECT_URL https://gepgitlab.laas.fr/${PROJECT_NAMESPACE}/${PROJECT_NAME})
Guilhem Saurel's avatar
Guilhem Saurel committed
12

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
SETUP_PROJECT()

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

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

40
IF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
Guilhem Saurel's avatar
Guilhem Saurel committed
41
42
43
44
45
  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})
  INSTALL(DIRECTORY tiago_description DESTINATION share/${PROJECT_NAME})
46
ENDIF(NOT INSTALL_PYTHON_INTERFACE_ONLY)
Guilhem Saurel's avatar
Guilhem Saurel committed
47
48

SETUP_PROJECT_FINALIZE()