From aa1c4eb26204e8a3b3ad2a93355f70ba3f99a994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Wed, 8 Mar 2017 09:54:59 +0100 Subject: [PATCH] Allow build with Osmium from external location. If OSMIUM_INCLUDE_DIR is specified in CMake command line, use Osmium from that location, instead of /third_party. --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c0377d275..30edd0042 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -530,7 +530,9 @@ else() # note libosmium depends on expat and bzip2 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/cmake") - set(OSMIUM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/include") + if(NOT OSMIUM_INCLUDE_DIR) + set(OSMIUM_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libosmium/include") + endif() find_package(Osmium REQUIRED COMPONENTS io) include_directories(SYSTEM ${OSMIUM_INCLUDE_DIR})