From 05a59189091e1bdf4bee29b208cd3411e6a2d161 Mon Sep 17 00:00:00 2001 From: Michael Krasnyk Date: Thu, 19 Apr 2018 14:06:36 +0300 Subject: [PATCH] Update CMakeLists.txt file --- CHANGELOG.md | 5 +++++ CMakeLists.txt | 29 +++++++++++++++++------------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 603f540c69b..4656a8fbddf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# UNRELEASED + - Changes from 5.17.0: + - Infrastructure: + - ADDED: Updated libosmium and added protozero and vtzero libraries [#5037](https://github.com/Project-OSRM/osrm-backend/pull/5037) + # 5.17.0 - Changes from 5.16.0: - Bugfixes: diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e6e40828d3..4dbc5a2ebc7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -167,7 +167,7 @@ add_executable(osrm-customize src/tools/customize.cpp) add_executable(osrm-contract src/tools/contract.cpp) add_executable(osrm-routed src/tools/routed.cpp $ $) add_executable(osrm-datastore src/tools/store.cpp $ $) -add_library(osrm src/osrm/osrm.cpp $ $ $ $ ) +add_library(osrm src/osrm/osrm.cpp $ $ $ $) add_library(osrm_contract src/osrm/contractor.cpp $ $) add_library(osrm_extract src/osrm/extractor.cpp $ $ $) add_library(osrm_guidance $ $) @@ -416,11 +416,24 @@ if(UNIX AND NOT APPLE) set(MAYBE_RT_LIBRARY -lrt) endif() -# Disallow deprecated protozero APIs -add_definitions(-DPROTOZERO_STRICT_API) - find_package(Threads REQUIRED) +# Third-party libraries +set(RAPIDJSON_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/rapidjson/include") +include_directories(SYSTEM ${RAPIDJSON_INCLUDE_DIR}) + +set(MICROTAR_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/microtar/src") +include_directories(SYSTEM ${MICROTAR_INCLUDE_DIR}) +add_library(MICROTAR OBJECT "${CMAKE_CURRENT_SOURCE_DIR}/third_party/microtar/src/microtar.c") +set_property(TARGET MICROTAR PROPERTY POSITION_INDEPENDENT_CODE ON) + +set(PROTOZERO_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/protozero/include") +include_directories(SYSTEM ${PROTOZERO_INCLUDE_DIR}) + +set(VTZERO_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/vtzero/include") +include_directories(SYSTEM ${VTZERO_INCLUDE_DIR}) + + # if mason is enabled no find_package calls are made # to ensure that we are only compiling and linking against # fully portable mason packages @@ -554,14 +567,6 @@ else() include_directories(SYSTEM ${OSMIUM_INCLUDE_DIR}) endif() -set(RAPIDJSON_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/rapidjson/include") -include_directories(SYSTEM ${RAPIDJSON_INCLUDE_DIR}) - -set(MICROTAR_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/microtar/src") -include_directories(SYSTEM ${MICROTAR_INCLUDE_DIR}) -add_library(MICROTAR OBJECT "${CMAKE_CURRENT_SOURCE_DIR}/third_party/microtar/src/microtar.c") -set_property(TARGET MICROTAR PROPERTY POSITION_INDEPENDENT_CODE ON) - # prefix compilation with ccache by default if available and on clang or gcc if(ENABLE_CCACHE AND (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")) find_program(CCACHE_FOUND ccache)