[osmcoastline] 01/05: Imported Upstream version 2.1.1

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Mon Aug 31 14:13:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository osmcoastline.

commit 2e10bf9a18cb3a7d4d9fc7eaf3b39193989923eb
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Mon Aug 31 16:02:50 2015 +0200

    Imported Upstream version 2.1.1
---
 CHANGELOG.md           | 10 +++++++-
 CMakeLists.txt         |  4 +--
 cmake/FindOsmium.cmake | 69 ++++++++++++++++++++------------------------------
 3 files changed, 39 insertions(+), 44 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5a47519..c56fb4f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,13 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 ### Fixed
 
 
+## [2.1.1] - 2015-08-31
+
+### Changed
+
+- Use newest libosmium release.
+
+
 ## [2.1.0] - 2015-08-18
 
 ### Added
@@ -32,7 +39,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 - Added man pages
 
 
-[unreleased]: https://github.com/osmcode/osmium-tool/compare/v2.1.0...HEAD
+[unreleased]: https://github.com/osmcode/osmium-tool/compare/v2.1.1...HEAD
+[2.1.1]: https://github.com/osmcode/osmium-tool/compare/v2.1.0...v2.1.1
 [2.1.0]: https://github.com/osmcode/osmium-tool/compare/v2.0.1...v2.1.0
 [2.0.1]: https://github.com/osmcode/osmium-tool/compare/v2.0.0...v2.0.1
 
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8ed758..c53c294 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ project(osmcoastline)
 
 set(OSMCOASTLINE_VERSION_MAJOR 2)
 set(OSMCOASTLINE_VERSION_MINOR 1)
-set(OSMCOASTLINE_VERSION_PATCH 0)
+set(OSMCOASTLINE_VERSION_PATCH 1)
 
 set(OSMCOASTLINE_VERSION
     ${OSMCOASTLINE_VERSION_MAJOR}.${OSMCOASTLINE_VERSION_MINOR}.${OSMCOASTLINE_VERSION_PATCH})
@@ -37,7 +37,7 @@ set(AUTHOR "Jochen Topf <jochen at topf.org>")
 #-----------------------------------------------------------------------------
 
 find_package(Osmium COMPONENTS io gdal)
-include_directories(${OSMIUM_INCLUDE_DIRS})
+include_directories(SYSTEM ${OSMIUM_INCLUDE_DIRS})
 
 if(MSVC)
     find_path(GETOPT_INCLUDE_DIR getopt.h)
diff --git a/cmake/FindOsmium.cmake b/cmake/FindOsmium.cmake
index bb14071..b3a4c95 100644
--- a/cmake/FindOsmium.cmake
+++ b/cmake/FindOsmium.cmake
@@ -19,7 +19,7 @@
 #    Then add the following in your CMakeLists.txt:
 #
 #      find_package(Osmium REQUIRED COMPONENTS <XXX>)
-#      include_directories(${OSMIUM_INCLUDE_DIRS})
+#      include_directories(SYSTEM ${OSMIUM_INCLUDE_DIRS})
 #
 #    For the <XXX> substitute a space separated list of one or more of the
 #    following components:
@@ -56,32 +56,12 @@ find_path(OSMIUM_INCLUDE_DIR osmium/osm.hpp
     PATH_SUFFIXES include
     PATHS
         ../libosmium
-        ../../libosmium
-        libosmium
         ~/Library/Frameworks
         /Library/Frameworks
-        /usr/local
-        /usr/
         /opt/local # DarwinPorts
         /opt
 )
 
-# Handle the QUIETLY and REQUIRED arguments and set OSMIUM_FOUND to TRUE if
-# all listed variables are TRUE.
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(OSMIUM REQUIRED_VARS OSMIUM_INCLUDE_DIR)
-
-# Copy the results to the output variables.
-if(OSMIUM_FOUND)
-    set(OSMIUM_INCLUDE_DIRS ${OSMIUM_INCLUDE_DIR})
-else()
-    set(OSMIUM_INCLUDE_DIRS "")
-endif()
-
-if(Osmium_FIND_REQUIRED AND NOT OSMIUM_FOUND)
-    message(FATAL_ERROR "Can not find libosmium headers, please install them or configure the paths")
-endif()
-
 #----------------------------------------------------------------------
 #
 #  Check for optional components
@@ -113,6 +93,7 @@ if(Osmium_USE_PBF)
     find_package(ZLIB)
     find_package(Threads)
 
+    list(APPEND OSMIUM_EXTRA_FIND_VARS ZLIB_FOUND Threads_FOUND)
     if(ZLIB_FOUND AND Threads_FOUND)
         list(APPEND OSMIUM_PBF_LIBRARIES
             ${ZLIB_LIBRARIES}
@@ -125,7 +106,6 @@ if(Osmium_USE_PBF)
             ${ZLIB_INCLUDE_DIR}
         )
     else()
-        set(_missing_libraries 1)
         message(WARNING "Osmium: Can not find some libraries for PBF input/output, please install them or configure the paths.")
     endif()
 endif()
@@ -138,6 +118,7 @@ if(Osmium_USE_XML)
     find_package(ZLIB)
     find_package(Threads)
 
+    list(APPEND OSMIUM_EXTRA_FIND_VARS EXPAT_FOUND BZIP2_FOUND ZLIB_FOUND Threads_FOUND)
     if(EXPAT_FOUND AND BZIP2_FOUND AND ZLIB_FOUND AND Threads_FOUND)
         list(APPEND OSMIUM_XML_LIBRARIES
             ${EXPAT_LIBRARIES}
@@ -151,7 +132,6 @@ if(Osmium_USE_XML)
             ${ZLIB_INCLUDE_DIR}
         )
     else()
-        set(_missing_libraries 1)
         message(WARNING "Osmium: Can not find some libraries for XML input/output, please install them or configure the paths.")
     endif()
 endif()
@@ -172,12 +152,12 @@ if(Osmium_USE_GEOS)
     find_path(GEOS_INCLUDE_DIR geos/geom.h)
     find_library(GEOS_LIBRARY NAMES geos)
 
+    list(APPEND OSMIUM_EXTRA_FIND_VARS GEOS_INCLUDE_DIR GEOS_LIBRARY)
     if(GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
         SET(GEOS_FOUND 1)
         list(APPEND OSMIUM_LIBRARIES ${GEOS_LIBRARY})
         list(APPEND OSMIUM_INCLUDE_DIRS ${GEOS_INCLUDE_DIR})
     else()
-        set(_missing_libraries 1)
         message(WARNING "Osmium: GEOS library is required but not found, please install it or configure the paths.")
     endif()
 endif()
@@ -187,11 +167,11 @@ endif()
 if(Osmium_USE_GDAL)
     find_package(GDAL)
 
+    list(APPEND OSMIUM_EXTRA_FIND_VARS GDAL_FOUND)
     if(GDAL_FOUND)
         list(APPEND OSMIUM_LIBRARIES ${GDAL_LIBRARIES})
         list(APPEND OSMIUM_INCLUDE_DIRS ${GDAL_INCLUDE_DIRS})
     else()
-        set(_missing_libraries 1)
         message(WARNING "Osmium: GDAL library is required but not found, please install it or configure the paths.")
     endif()
 endif()
@@ -202,12 +182,12 @@ if(Osmium_USE_PROJ)
     find_path(PROJ_INCLUDE_DIR proj_api.h)
     find_library(PROJ_LIBRARY NAMES proj)
 
+    list(APPEND OSMIUM_EXTRA_FIND_VARS PROJ_INCLUDE_DIR PROJ_LIBRARY)
     if(PROJ_INCLUDE_DIR AND PROJ_LIBRARY)
         set(PROJ_FOUND 1)
         list(APPEND OSMIUM_LIBRARIES ${PROJ_LIBRARY})
         list(APPEND OSMIUM_INCLUDE_DIRS ${PROJ_INCLUDE_DIR})
     else()
-        set(_missing_libraries 1)
         message(WARNING "Osmium: PROJ.4 library is required but not found, please install it or configure the paths.")
     endif()
 endif()
@@ -217,21 +197,19 @@ endif()
 if(Osmium_USE_SPARSEHASH)
     find_path(SPARSEHASH_INCLUDE_DIR google/sparsetable)
 
+    list(APPEND OSMIUM_EXTRA_FIND_VARS SPARSEHASH_INCLUDE_DIR)
     if(SPARSEHASH_INCLUDE_DIR)
         # Find size of sparsetable::size_type. This does not work on older
         # CMake versions because they can do this check only in C, not in C++.
-        include(CheckTypeSize)
-        set(CMAKE_REQUIRED_INCLUDES ${SPARSEHASH_INCLUDE_DIR})
-        set(CMAKE_EXTRA_INCLUDE_FILES "google/sparsetable")
-        check_type_size("google::sparsetable<int>::size_type" SPARSETABLE_SIZE_TYPE LANGUAGE CXX)
-        set(CMAKE_EXTRA_INCLUDE_FILES)
-        set(CMAKE_REQUIRED_INCLUDES)
-
-        # Falling back to checking size_t if google::sparsetable<int>::size_type
-        # could not be checked.
-        if(SPARSETABLE_SIZE_TYPE STREQUAL "")
-            check_type_size("void*" VOID_PTR_SIZE)
-            set(SPARSETABLE_SIZE_TYPE ${VOID_PTR_SIZE})
+        if (NOT CMAKE_VERSION VERSION_LESS 3.0)
+           include(CheckTypeSize)
+           set(CMAKE_REQUIRED_INCLUDES ${SPARSEHASH_INCLUDE_DIR})
+           set(CMAKE_EXTRA_INCLUDE_FILES "google/sparsetable")
+           check_type_size("google::sparsetable<int>::size_type" SPARSETABLE_SIZE_TYPE LANGUAGE CXX)
+           set(CMAKE_EXTRA_INCLUDE_FILES)
+           set(CMAKE_REQUIRED_INCLUDES)
+        else()
+           set(SPARSETABLE_SIZE_TYPE ${CMAKE_SIZEOF_VOID_P})
         endif()
 
         # Sparsetable::size_type must be at least 8 bytes (64bit), otherwise
@@ -244,7 +222,6 @@ if(Osmium_USE_SPARSEHASH)
             message(WARNING "Osmium: Disabled Google SparseHash library on 32bit system (size_type=${SPARSETABLE_SIZE_TYPE}).")
         endif()
     else()
-        set(_missing_libraries 1)
         message(WARNING "Osmium: Google SparseHash library is required but not found, please install it or configure the paths.")
     endif()
 endif()
@@ -274,8 +251,18 @@ endif()
 #  Check that all required libraries are available
 #
 #----------------------------------------------------------------------
-if(Osmium_FIND_REQUIRED AND _missing_libraries)
-    message(FATAL_ERROR "Required library or libraries missing. Aborting.")
+list(REMOVE_DUPLICATES OSMIUM_EXTRA_FIND_VARS)
+# Handle the QUIETLY and REQUIRED arguments and set OSMIUM_FOUND to TRUE if
+# all listed variables are TRUE.
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Osmium REQUIRED_VARS OSMIUM_INCLUDE_DIR ${OSMIUM_EXTRA_FIND_VARS})
+unset(OSMIUM_EXTRA_FIND_VARS)
+
+# Copy the results to the output variables.
+if(OSMIUM_FOUND)
+    set(OSMIUM_INCLUDE_DIRS ${OSMIUM_INCLUDE_DIR} ${OSMIUM_INCLUDE_DIRS})
+else()
+    set(OSMIUM_INCLUDE_DIRS "")
 endif()
 
 #----------------------------------------------------------------------

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmcoastline.git



More information about the Pkg-grass-devel mailing list