|
32 | 32 | # io - include libraries needed for any type of input/output |
33 | 33 | # geos - include if you want to use any of the GEOS functions |
34 | 34 | # gdal - include if you want to use any of the OGR functions |
35 | | -# proj - include if you want to use any of the Proj.4 functions |
36 | | -# sparsehash - include if you use the sparsehash index |
37 | 35 | # lz4 - include support for LZ4 compression of PBF files |
38 | 36 | # |
39 | 37 | # You can check for success with something like this: |
@@ -196,56 +194,6 @@ if(Osmium_USE_GDAL) |
196 | 194 | endif() |
197 | 195 | endif() |
198 | 196 |
|
199 | | -#---------------------------------------------------------------------- |
200 | | -# Component 'proj' |
201 | | -if(Osmium_USE_PROJ) |
202 | | - find_path(PROJ_INCLUDE_DIR proj_api.h) |
203 | | - find_library(PROJ_LIBRARY NAMES proj) |
204 | | - |
205 | | - list(APPEND OSMIUM_EXTRA_FIND_VARS PROJ_INCLUDE_DIR PROJ_LIBRARY) |
206 | | - if(PROJ_INCLUDE_DIR AND PROJ_LIBRARY) |
207 | | - set(PROJ_FOUND 1) |
208 | | - list(APPEND OSMIUM_LIBRARIES ${PROJ_LIBRARY}) |
209 | | - list(APPEND OSMIUM_INCLUDE_DIRS ${PROJ_INCLUDE_DIR}) |
210 | | - else() |
211 | | - message(WARNING "Osmium: PROJ.4 library is required but not found, please install it or configure the paths.") |
212 | | - endif() |
213 | | -endif() |
214 | | - |
215 | | -#---------------------------------------------------------------------- |
216 | | -# Component 'sparsehash' |
217 | | -if(Osmium_USE_SPARSEHASH) |
218 | | - find_path(SPARSEHASH_INCLUDE_DIR google/sparsetable) |
219 | | - |
220 | | - list(APPEND OSMIUM_EXTRA_FIND_VARS SPARSEHASH_INCLUDE_DIR) |
221 | | - if(SPARSEHASH_INCLUDE_DIR) |
222 | | - # Find size of sparsetable::size_type. This does not work on older |
223 | | - # CMake versions because they can do this check only in C, not in C++. |
224 | | - if(NOT CMAKE_VERSION VERSION_LESS 3.0) |
225 | | - include(CheckTypeSize) |
226 | | - set(CMAKE_REQUIRED_INCLUDES ${SPARSEHASH_INCLUDE_DIR}) |
227 | | - set(CMAKE_EXTRA_INCLUDE_FILES "google/sparsetable") |
228 | | - check_type_size("google::sparsetable<int>::size_type" SPARSETABLE_SIZE_TYPE LANGUAGE CXX) |
229 | | - set(CMAKE_EXTRA_INCLUDE_FILES) |
230 | | - set(CMAKE_REQUIRED_INCLUDES) |
231 | | - else() |
232 | | - set(SPARSETABLE_SIZE_TYPE ${CMAKE_SIZEOF_VOID_P}) |
233 | | - endif() |
234 | | - |
235 | | - # Sparsetable::size_type must be at least 8 bytes (64bit), otherwise |
236 | | - # OSM object IDs will not fit. |
237 | | - if(SPARSETABLE_SIZE_TYPE GREATER 7) |
238 | | - set(SPARSEHASH_FOUND 1) |
239 | | - add_definitions(-DOSMIUM_WITH_SPARSEHASH=${SPARSEHASH_FOUND}) |
240 | | - list(APPEND OSMIUM_INCLUDE_DIRS ${SPARSEHASH_INCLUDE_DIR}) |
241 | | - else() |
242 | | - message(WARNING "Osmium: Disabled Google SparseHash library on 32bit system (size_type=${SPARSETABLE_SIZE_TYPE}).") |
243 | | - endif() |
244 | | - else() |
245 | | - message(WARNING "Osmium: Google SparseHash library is required but not found, please install it or configure the paths.") |
246 | | - endif() |
247 | | -endif() |
248 | | - |
249 | 197 | #---------------------------------------------------------------------- |
250 | 198 |
|
251 | 199 | list(REMOVE_DUPLICATES OSMIUM_INCLUDE_DIRS) |
@@ -281,7 +229,6 @@ find_package_handle_standard_args(Osmium |
281 | 229 | REQUIRED_VARS OSMIUM_INCLUDE_DIR ${OSMIUM_EXTRA_FIND_VARS} |
282 | 230 | VERSION_VAR _libosmium_version) |
283 | 231 | unset(OSMIUM_EXTRA_FIND_VARS) |
284 | | -set(OSMIUM_VERSION ${_libosmium_version}) |
285 | 232 |
|
286 | 233 | #---------------------------------------------------------------------- |
287 | 234 | # |
|
0 commit comments