pgRouting

root/branches/anton/CMakeLists.txt

Revision 29, 1.8 kB (checked in by anton, 1 year 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}.
5 CMAKE_MINIMUM_REQUIRED(VERSION 2.3)
6 PROJECT(PGROUTING)
7
8 #-----------------------------------------------------------------------------
9 # PGROUTING version number.
10 SET(PGROUTING_VERSION_MAJOR "1")
11 SET(PGROUTING_VERSION_MINOR "0")
12 SET(PGROUTING_VERSION_PATCH "0")
13
14 SET(PGROUTING_VERSION_STRING "${PGROUTING_VERSION_MAJOR}.${PGROUTING_VERSION_MINOR}")
15
16 add_subdirectory(cmake)
17 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
18
19 include (MacroLibrary)
20
21 macro_optional_find_package(PostgreSQL)
22
23 OPTION(WITH_TSP "Build TSP library" OFF)
24 OPTION(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.
29 SUBDIRS(core/src)
30
31 IF(WITH_TSP)
32 ADD_SUBDIRECTORY(extra/tsp/src)
33 macro_optional_find_package(GAUL)
34 ENDIF(WITH_TSP)
35
36 IF(WITH_DD)
37 ADD_SUBDIRECTORY(extra/driving_distance/src)
38 macro_optional_find_package(CGAL)
39 ENDIF(WITH_DD)
40
41 SET(LIBRARY_OUTPUT_PATH ${PGROUTING_BINARY_DIR}/lib)
42 SET(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.
46 INCLUDE_DIRECTORIES(. ${PGROUTING_INCLUDE_DIRECTORIES})
47
48 SET(CMAKE_CXX_FLAGS=-O2 -g -Wall -fpic)
49
50
51
52
53
Note: See TracBrowser for help on using the browser.