CMakeLists.txt 1.96 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/pthread.cmake)
21

22
23
24
25
SET(PROJECT_NAME dynamic-graph)
SET(PROJECT_VERSION 1.0.0.99)
SET(PROJECT_DESCRIPTION "Dynamic graph library")
SET(PROJECT_URL "http://github.com/jrl-umi3218/dynamic-graph")
26

27
28
SET(CUSTOM_HEADER_DIR "${PROJECT_NAME}")

29
# Defines paths.
30
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
31

32
33
# Disable -Werror on Unix for now.
SET(CXX_DISABLE_WERROR True)
34

35
SETUP_PROJECT()
36

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

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

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

50
# Search for Boost.
51
SEARCH_FOR_BOOST()
52
SEARCH_FOR_PTHREAD()
53

54
# Remove additional warnings.
55
IF(WIN32)
56
  ADD_DEFINITIONS("/wd4251 /wd4275 /wd4101 /wd4355")
57
58
ENDIF(WIN32)

59
60
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(include)
61
ADD_SUBDIRECTORY(tools)
62
ADD_SUBDIRECTORY(doc)
Francois Bleibel's avatar
Francois Bleibel committed
63
ADD_SUBDIRECTORY(unitTesting)
64
65

SETUP_PROJECT_FINALIZE()