forked from pgRouting/osm2pgrouting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (34 loc) · 1.84 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
PROJECT(osm2pgrouting)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
set (SHARE_DIR "/usr/share/osm2pgrouting")
FIND_PACKAGE(PostgreSQL REQUIRED)
FIND_PACKAGE(EXPAT REQUIRED)
FIND_PACKAGE(Boost REQUIRED)
FIND_PACKAGE(Boost 1.40 COMPONENTS program_options REQUIRED )
FILE(GLOB SRC "${CMAKE_SOURCE_DIR}/src/*.cpp" "${CMAKE_SOURCE_DIR}/src/*.h")
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64 -std=c++0x -fPIC -O2 -g -Wall -Wconversion -pedantic -fmax-errors=10 -Wextra -frounding-math -Wno-deprecated")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64 -std=c++0x -O2")
#INCLUDE_DIRECTORIES(src ${POSTGRESQL_INCLUDE_DIR} ${EXPAT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})
#ADD_EXECUTABLE(osm2pgrouting ${SRC})
#TARGET_LINK_LIBRARIES(osm2pgrouting ${POSTGRESQL_LIBRARIES} ${EXPAT_LIBRARIES})
message(STATUS "POSTGRESQL_INCLUDE_DIR: ${POSTGRESQL_INCLUDE_DIR}")
message(STATUS "EXPAT_INCLUDE_DIRS: ${EXPAT_INCLUDE_DIRS}")
message(STATUS "Boost_INCLUDE_DIRS: ${Boost_INCLUDE_DIRS}")
message(STATUS "Boost_INCLUDE_DIR: ${Boost_INCLUDE_DIR}")
message(STATUS "POSTGRESQL_LIBRARIES: ${POSTGRESQL_LIBRARIES}")
message(STATUS "Boost_LIBRARIES: ${boost_LIBRARIES}")
INCLUDE_DIRECTORIES(src ${POSTGRESQL_INCLUDE_DIR} ${EXPAT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIR})
ADD_EXECUTABLE(osm2pgrouting ${SRC})
TARGET_LINK_LIBRARIES(osm2pgrouting ${POSTGRESQL_LIBRARIES} ${EXPAT_LIBRARIES} ${Boost_LIBRARIES} )
INSTALL(TARGETS osm2pgrouting
RUNTIME DESTINATION "/usr/bin"
)
INSTALL(FILES
"${CMAKE_SOURCE_DIR}/COPYING"
"${CMAKE_SOURCE_DIR}/Readme.md"
"${CMAKE_SOURCE_DIR}/mapconfig.xml"
"${CMAKE_SOURCE_DIR}/mapconfig_for_cars.xml"
DESTINATION "${SHARE_DIR}")
#INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIR} )
#TARGET_LINK_LIBRARIES( osm2pgrouting ${Boost_LIBRARIES} )