CMakeLists.txt 1.48 KB
Newer Older
Guilhem Saurel's avatar
Guilhem Saurel committed
1
# Copyright 2010-2020, Florent Lamiraux, Thomas Moulard, Olivier Stasse, Guilhem Saurel, JRL, CNRS/AIST, LAAS-CNRS
florent's avatar
florent committed
2

3
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
Guilhem Saurel's avatar
Guilhem Saurel committed
4
5
6
7
8

SET(PROJECT_NAMESPACE stack-of-tasks)
SET(PROJECT_NAME dynamic-graph-python)
SET(PROJECT_DESCRIPTION "Dynamic graph library Python bindings")
SET(PROJECT_URL "http://github.com/${PROJECT_NAMESPACE}/${PROJECT_NAME}")
florent's avatar
florent committed
9

10
SET(PROJECT_USE_CMAKE_EXPORT TRUE)
11
12
SET(CUSTOM_HEADER_DIR "dynamic-graph/python")
SET(CXX_DISABLE_WERROR TRUE)
Guilhem Saurel's avatar
Guilhem Saurel committed
13
SET(DOXYGEN_USE_MATHJAX YES)
14

15
INCLUDE(cmake/base.cmake)
Thomas Moulard's avatar
Thomas Moulard committed
16
INCLUDE(cmake/boost.cmake)
17
INCLUDE(cmake/eigen.cmake)
18
19
INCLUDE(cmake/python.cmake)
INCLUDE(cmake/test.cmake)
Guilhem Saurel's avatar
Guilhem Saurel committed
20
INCLUDE(cmake/sphinx.cmake)
florent's avatar
florent committed
21

22
23
SET(PKG_CONFIG_ADDITIONAL_VARIABLES plugindir ${PKG_CONFIG_ADDITIONAL_VARIABLES})

24
25
26
27
OPTION(SUFFIX_SO_VERSION
  "Suffix shared library name by a string depending on git status of project"
  ON)

28
29
COMPUTE_PROJECT_ARGS(PROJECT_ARGS LANGUAGES CXX)
PROJECT(${PROJECT_NAME} ${PROJECT_ARGS})
florent's avatar
florent committed
30

Guilhem Saurel's avatar
Guilhem Saurel committed
31
FINDPYTHON()
Guilhem Saurel's avatar
Guilhem Saurel committed
32
INCLUDE_DIRECTORIES(SYSTEM ${PYTHON_INCLUDE_DIRS})
Guilhem Saurel's avatar
Guilhem Saurel committed
33

34
35
ADD_PROJECT_DEPENDENCY(Eigen3 REQUIRED PKG_CONFIG_REQUIRES eigen3)
ADD_PROJECT_DEPENDENCY(dynamic-graph REQUIRED PKG_CONFIG_REQUIRES dynamic-graph)
36

37
38
PKG_CONFIG_APPEND_LIBS("dynamic-graph-python")

39
SET(BOOST_COMPONENTS filesystem system thread program_options unit_test_framework python)
40
41
SEARCH_FOR_BOOST()

florent's avatar
florent committed
42
ADD_SUBDIRECTORY(src)
43
ADD_SUBDIRECTORY(include/${CUSTOM_HEADER_DIR})
Thomas Moulard's avatar
Thomas Moulard committed
44
ADD_SUBDIRECTORY(doc)
45
ADD_SUBDIRECTORY(unitTesting)
Guilhem Saurel's avatar
v3.5.0    
Guilhem Saurel committed
46
47

INSTALL(FILES package.xml DESTINATION share/${PROJECT_NAME})