-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
24 lines (21 loc) · 1.03 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
cmake_minimum_required(VERSION 3.2)
project(osmotron)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lboost_program_options")
if (CMAKE_BUILD_TYPE MATCHES Debug)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -O0 -Wall -Wextra")
else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -O3")
endif ()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
find_package(Boost COMPONENTS program_options REQUIRED)
include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
find_package(Osmium REQUIRED COMPONENTS <io xml sparsehash>)
include_directories(SYSTEM ${OSMIUM_INCLUDE_DIRS})
set(SOURCE_FILES LogginProblemReporter.h ExportHandler.h b64/base64.h b64/base64.cpp GeometryConverter.h)
set(PROG osmotron)
set(TEST testrunner)
add_executable(${PROG} main.cpp ${SOURCE_FILES})
add_executable(${TEST} test/testrunner.cpp ${SOURCE_FILES})
target_link_libraries(${PROG} ${Boost_LIBRARIES} ${OSMIUM_LIBRARIES})
target_link_libraries(${TEST} ${Boost_LIBRARIES} ${OSMIUM_LIBRARIES})