CMakeLists.txt 2.23 KB
Newer Older
Thomas Moulard's avatar
Thomas Moulard committed
1
# Copyright 2010, Olivier Stasse, JRL, CNRS/AIST
2
#
Thomas Moulard's avatar
Thomas Moulard committed
3
4
5
6
7
# This file is part of dynamic-graph.
# dynamic-graph 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.
8
#
Thomas Moulard's avatar
Thomas Moulard committed
9
10
11
12
13
14
# dynamic-graph 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. If not, see <http://www.gnu.org/licenses/>.
15
16
17

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

18
INCLUDE(cmake/base.cmake)
19
INCLUDE(cmake/boost.cmake)
20
INCLUDE(cmake/eigen.cmake)
21
INCLUDE(cmake/pthread.cmake)
22
INCLUDE(cmake/cpack.cmake)
23

24
25
26
SET(PROJECT_NAME dynamic-graph)
SET(PROJECT_DESCRIPTION "Dynamic graph library")
SET(PROJECT_URL "http://github.com/jrl-umi3218/dynamic-graph")
27
SET(PROJECT_SUFFIX "-v3")
28

29
30
SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}")

Guilhem Saurel's avatar
Guilhem Saurel committed
31
32
SET(DOXYGEN_USE_MATHJAX YES)

33
# Defines paths.
34
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
35

36
SETUP_PROJECT()
37

38
39
40
41
42
43
44
45
46
47
# Add configuration headers for plug-ins.
GENERATE_CONFIGURATION_HEADER(
  ${HEADER_DIR} config-tracer.hh DG_TRACER tracer_EXPORTS)
GENERATE_CONFIGURATION_HEADER(
  ${HEADER_DIR}
  config-tracer-real-time.hh DG_TRACERREALTIME tracer_real_time_EXPORTS)
GENERATE_CONFIGURATION_HEADER(
  ${HEADER_DIR}
  config-contiifstream.hh DG_CONTIIFSTREAM contiifstream_EXPORTS)

48
49
# FIXME: to be changed into lib/dynamic-graph
# to avoid name collision when installing dynamic-graph in /usr.
50
SET(PLUGINDIR "${CMAKE_INSTALL_FULL_LIBDIR}/plugin")
51

52
53
# Add extra keys to pkg-config file to export the location of the
# plug-in directory in a robust manner.
54
SET(PKG_CONFIG_EXTRA "plugindir=${PLUGINDIR}")
55

56
# Add dependency toward dynamic graph library in pkg-config file.
57
PKG_CONFIG_APPEND_LIBS("dynamic-graph")
58

59
# Search for Boost.
60
SEARCH_FOR_BOOST()
61
SEARCH_FOR_PTHREAD()
62

63
64
65
# Search for Boost.
SEARCH_FOR_EIGEN()

66
67
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(include)
Thomas Moulard's avatar
Thomas Moulard committed
68
ADD_SUBDIRECTORY(tests)
69
ADD_SUBDIRECTORY(share)
70
71

SETUP_PROJECT_FINALIZE()
72
SETUP_PROJECT_CPACK()