Skip to content

Commit b6c4cac

Browse files
committed
CMake config: Update osmium package helper to newest version
1 parent fdf6021 commit b6c4cac

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

cmake/FindOsmium.cmake

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
# geos - include if you want to use any of the GEOS functions
3434
# gdal - include if you want to use any of the OGR functions
3535
# proj - include if you want to use any of the Proj.4 functions
36-
# sparsehash - include if you use the sparsehash index
36+
# sparsehash - include if you use the sparsehash index (deprecated!)
37+
# lz4 - include support for LZ4 compression of PBF files
3738
#
3839
# You can check for success with something like this:
3940
#
@@ -116,14 +117,21 @@ if(Osmium_USE_PBF)
116117
find_package(Threads)
117118
find_package(Protozero 1.6.3)
118119

120+
if(Osmium_USE_LZ4)
121+
find_package(LZ4 REQUIRED)
122+
add_definitions(-DOSMIUM_WITH_LZ4)
123+
endif()
124+
119125
list(APPEND OSMIUM_EXTRA_FIND_VARS ZLIB_FOUND Threads_FOUND PROTOZERO_INCLUDE_DIR)
120126
if(ZLIB_FOUND AND Threads_FOUND AND PROTOZERO_FOUND)
121127
list(APPEND OSMIUM_PBF_LIBRARIES
122128
${ZLIB_LIBRARIES}
129+
${LZ4_LIBRARIES}
123130
${CMAKE_THREAD_LIBS_INIT}
124131
)
125132
list(APPEND OSMIUM_INCLUDE_DIRS
126133
${ZLIB_INCLUDE_DIR}
134+
${LZ4_INCLUDE_DIRS}
127135
${PROTOZERO_INCLUDE_DIR}
128136
)
129137
else()
@@ -216,6 +224,7 @@ endif()
216224
#----------------------------------------------------------------------
217225
# Component 'sparsehash'
218226
if(Osmium_USE_SPARSEHASH)
227+
message(WARNING "Osmium: Use of Google SparseHash is deprecated. Please switch to a different index type.")
219228
find_path(SPARSEHASH_INCLUDE_DIR google/sparsetable)
220229

221230
list(APPEND OSMIUM_EXTRA_FIND_VARS SPARSEHASH_INCLUDE_DIR)

0 commit comments

Comments
 (0)