Skip to content

Commit 3819bdd

Browse files
committed
update cmake scripts for protozero and libosmium
1 parent ede49f5 commit 3819bdd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cmake/FindOsmium.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ find_path(OSMIUM_INCLUDE_DIR osmium/version.hpp
7171

7272
# Check libosmium version number
7373
if(Osmium_FIND_VERSION)
74+
if(NOT EXISTS "${OSMIUM_INCLUDE_DIR}/osmium/version.hpp")
75+
message(FATAL_ERROR "Missing ${OSMIUM_INCLUDE_DIR}/osmium/version.hpp. Either your libosmium version is too old, or libosmium wasn't found in the place you said.")
76+
endif()
7477
file(STRINGS "${OSMIUM_INCLUDE_DIR}/osmium/version.hpp" _libosmium_version_define REGEX "#define LIBOSMIUM_VERSION_STRING")
7578
if("${_libosmium_version_define}" MATCHES "#define LIBOSMIUM_VERSION_STRING \"([0-9.]+)\"")
7679
set(_libosmium_version "${CMAKE_MATCH_1}")
@@ -111,7 +114,7 @@ endif()
111114
if(Osmium_USE_PBF)
112115
find_package(ZLIB)
113116
find_package(Threads)
114-
find_package(Protozero 1.5.1)
117+
find_package(Protozero 1.6.3)
115118

116119
list(APPEND OSMIUM_EXTRA_FIND_VARS ZLIB_FOUND Threads_FOUND PROTOZERO_INCLUDE_DIR)
117120
if(ZLIB_FOUND AND Threads_FOUND AND PROTOZERO_FOUND)
@@ -324,7 +327,7 @@ if(MSVC)
324327
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS)
325328
endif()
326329

327-
if(APPLE)
330+
if(APPLE AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
328331
# following only available from cmake 2.8.12:
329332
# add_compile_options(-stdlib=libc++)
330333
# so using this instead:

0 commit comments

Comments
 (0)