root/branches/anton/CMakeLists.txt

Revision 29, 1.8 KB (checked in by anton, 3 years ago)

CGAL and GAUL cmake support added

Line 
1#The first, top-level directory contains the following CMakeLists.txt file.
2# The name of our project is "VISPACK".  CMakeLists files in this project can
3# refer to the root source directory of the project as ${VISPACK_SOURCE_DIR} and
4# to the root binary directory of the project as ${VISPACK_BINARY_DIR}.
5CMAKE_MINIMUM_REQUIRED(VERSION 2.3)
6PROJECT(PGROUTING)
7
8#-----------------------------------------------------------------------------
9# PGROUTING version number.
10SET(PGROUTING_VERSION_MAJOR "1")
11SET(PGROUTING_VERSION_MINOR "0")
12SET(PGROUTING_VERSION_PATCH "0")
13
14SET(PGROUTING_VERSION_STRING "${PGROUTING_VERSION_MAJOR}.${PGROUTING_VERSION_MINOR}")
15
16add_subdirectory(cmake)
17SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
18
19include (MacroLibrary)
20
21macro_optional_find_package(PostgreSQL)
22
23OPTION(WITH_TSP "Build TSP library" OFF)
24OPTION(WITH_DD "Build Driving distance library" OFF)
25
26# Recurse into the subdirectories.  This does not actually
27# cause another cmake executable to run.  The same process will walk through
28# the project's entire directory structure.
29SUBDIRS(core/src)
30
31IF(WITH_TSP)
32ADD_SUBDIRECTORY(extra/tsp/src)
33macro_optional_find_package(GAUL)
34ENDIF(WITH_TSP)
35
36IF(WITH_DD)
37ADD_SUBDIRECTORY(extra/driving_distance/src)
38macro_optional_find_package(CGAL)
39ENDIF(WITH_DD)
40
41SET(LIBRARY_OUTPUT_PATH ${PGROUTING_BINARY_DIR}/lib)
42SET(PGROUTING_INCLUDE_DIRECTORIES ${PGROUTING_SOURCE_DIR}/core ${PGROUTING_SOURCE_DIR}/core/src ${PGROUTING_SOURCE_DIR}/extra ${PGROUTING_SOURCE_DIR}/extra/tsp ${PGROUTING_SOURCE_DIR}/extra/tsp/src ${PGROUTING_SOURCE_DIR}/extra/driving_distance ${PGROUTING_SOURCE_DIR}/extra/driving_distance/src
43)
44
45# Make sure the compiler can find include files from our Hello library.
46INCLUDE_DIRECTORIES(. ${PGROUTING_INCLUDE_DIRECTORIES})
47
48SET(CMAKE_CXX_FLAGS=-O2 -g -Wall -fpic)
49
50
51
52
53
Note: See TracBrowser for help on using the browser.