CMakeLists.txt 1.59 KB
Newer Older
Thomas Moulard's avatar
Thomas Moulard committed
1
# Copyright 2010, Olivier Stasse, JRL, CNRS/AIST
2 3 4 5

CMAKE_MINIMUM_REQUIRED(VERSION 2.6)


Guilhem Saurel's avatar
Guilhem Saurel committed
6
SET(PROJECT_ORG stack-of-tasks)
7 8
SET(PROJECT_NAME dynamic-graph)
SET(PROJECT_DESCRIPTION "Dynamic graph library")
Guilhem Saurel's avatar
Guilhem Saurel committed
9
SET(PROJECT_URL "http://github.com/${PROJECT_ORG}/${PROJECT_NAME}")
10
SET(PROJECT_SUFFIX "-v3")
11

12 13 14 15 16 17 18 19 20 21
INCLUDE(cmake/base.cmake)
PROJECT(${PROJECT_NAME} CXX)

INCLUDE(cmake/boost.cmake)
INCLUDE(cmake/eigen.cmake)
INCLUDE(cmake/pthread.cmake)

# Export CMake Target
SET(PROJECT_USE_CMAKE_EXPORT TRUE)

22 23
SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}")

Guilhem Saurel's avatar
Guilhem Saurel committed
24 25
SET(DOXYGEN_USE_MATHJAX YES)

26
# Defines paths.
27
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
28

29 30 31 32 33 34 35
# 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)

36 37
# FIXME: to be changed into lib/dynamic-graph
# to avoid name collision when installing dynamic-graph in /usr.
38
SET(PLUGINDIR "${CMAKE_INSTALL_FULL_LIBDIR}/plugin")
39

40 41
# Add extra keys to pkg-config file to export the location of the
# plug-in directory in a robust manner.
42
SET(PKG_CONFIG_EXTRA "plugindir=${PLUGINDIR}")
43

44
# Add dependency toward dynamic graph library in pkg-config file.
Guilhem Saurel's avatar
Guilhem Saurel committed
45
PKG_CONFIG_APPEND_LIBS(${PROJECT_NAME})
46

47
# Search for Boost.
48
SET(BOOST_COMPONENTS serialization system unit_test_framework thread)
49
SEARCH_FOR_BOOST()
50
SEARCH_FOR_PTHREAD()
51

52 53 54
# Search for Boost.
SEARCH_FOR_EIGEN()

55
ADD_SUBDIRECTORY(src)
Guilhem Saurel's avatar
Guilhem Saurel committed
56
ADD_SUBDIRECTORY(include/${PROJECT_NAME})
57
ADD_SUBDIRECTORY(tests)
58 59

SETUP_PROJECT_FINALIZE()
60
SETUP_PROJECT_PACKAGE_FINALIZE()