CMakeLists.txt 1.59 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

Guilhem Saurel's avatar
Guilhem Saurel committed
3
4
5
6
7
8
CMAKE_MINIMUM_REQUIRED(VERSION 2.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
ADD_REQUIRED_DEPENDENCY(eigen3)
35
ADD_PROJECT_DEPENDENCY(dynamic-graph 3.8.1 REQUIRED)
florent's avatar
florent committed
36

37
38
39
40
# manually append to the .pc dependencies for now
# ref https://github.com/jrl-umi3218/jrl-cmakemodules/issues/320
_ADD_TO_LIST(_PKG_CONFIG_REQUIRES "dynamic-graph >= 3.8.1" ",")

41
42
PKG_CONFIG_APPEND_LIBS("dynamic-graph-python")

43
SET(BOOST_COMPONENTS filesystem system thread program_options unit_test_framework python)
44
45
SEARCH_FOR_BOOST()

florent's avatar
florent committed
46
ADD_SUBDIRECTORY(src)
47
ADD_SUBDIRECTORY(include/${CUSTOM_HEADER_DIR})
Thomas Moulard's avatar
Thomas Moulard committed
48
ADD_SUBDIRECTORY(doc)
49
ADD_SUBDIRECTORY(unitTesting)
Guilhem Saurel's avatar
v3.5.0    
Guilhem Saurel committed
50
51

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