CMakeLists.txt 1.98 KB
Newer Older
Thomas Moulard's avatar
Thomas Moulard committed
1
# Copyright 2010, 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST
florent's avatar
florent committed
2
#
Thomas Moulard's avatar
Thomas Moulard committed
3
4
5
6
7
# This file is part of dynamic-graph-python.
# dynamic-graph-python is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
florent's avatar
florent committed
8
#
Thomas Moulard's avatar
Thomas Moulard committed
9
10
11
12
13
14
# dynamic-graph-python is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Lesser Public License for more details.  You should have
# received a copy of the GNU Lesser General Public License along with
# dynamic-graph-python. If not, see <http://www.gnu.org/licenses/>.
florent's avatar
florent committed
15
16
17

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

18
INCLUDE(cmake/base.cmake)
Thomas Moulard's avatar
Thomas Moulard committed
19
INCLUDE(cmake/boost.cmake)
20
INCLUDE(cmake/eigen.cmake)
Thomas Moulard's avatar
Thomas Moulard committed
21
22
INCLUDE(cmake/pthread.cmake)
INCLUDE(cmake/cpack.cmake)
23
include(cmake/header.cmake)
Guilhem Saurel's avatar
Guilhem Saurel committed
24
include(cmake/python.cmake)
florent's avatar
florent committed
25

Thomas Moulard's avatar
Thomas Moulard committed
26
27
SET(PROJECT_NAME dynamic-graph-python)
SET(PROJECT_DESCRIPTION "Dynamic graph library Python bindings")
Guilhem Saurel's avatar
Guilhem Saurel committed
28
SET(PROJECT_URL "http://github.com/stack-of-tasks/dynamic-graph-python")
florent's avatar
florent committed
29

30
SET(CUSTOM_HEADER_DIR "dynamic-graph/python")
31
32
33
# Headers list.
SET(${PROJECT_NAME}_HEADERS
  include/dynamic-graph/python/interpreter.hh
34
  include/dynamic-graph/python/api.hh
35
36
  include/dynamic-graph/python/exception-python.hh

37
)
florent's avatar
florent committed
38

39
40
SET(PKG_CONFIG_ADDITIONAL_VARIABLES plugindir ${PKG_CONFIG_ADDITIONAL_VARIABLES})

Thomas Moulard's avatar
Thomas Moulard committed
41
SETUP_PROJECT()
florent's avatar
florent committed
42

Guilhem Saurel's avatar
Guilhem Saurel committed
43
44
FINDPYTHON()

Thomas Moulard's avatar
Thomas Moulard committed
45
# Trigger dependency to dynamic-graph.
46
ADD_REQUIRED_DEPENDENCY("dynamic-graph >= 3.0.0")
florent's avatar
florent committed
47

48
49
50
# Add dependency toward dynamic graph library in pkg-config file.
PKG_CONFIG_APPEND_LIBS("dynamic-graph-python")

51
# Search for Boost.
52
SET(BOOST_COMPONENTS python filesystem system thread program_options unit_test_framework)
53
SEARCH_FOR_BOOST()
54
SEARCH_FOR_EIGEN()
55

florent's avatar
florent committed
56
ADD_SUBDIRECTORY(src)
57
ADD_SUBDIRECTORY(include)
Thomas Moulard's avatar
Thomas Moulard committed
58
ADD_SUBDIRECTORY(doc)
59
ADD_SUBDIRECTORY(unitTesting)
60

Thomas Moulard's avatar
Thomas Moulard committed
61
SETUP_PROJECT_FINALIZE()
62