[osmium-tool] 37/97: reorder libraries and add ws2_32 for MinGW
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Tue Jul 21 20:15:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to tag v1.0.0
in repository osmium-tool.
commit 3424e40b4031a4bf80a617b28cba5103e788beef
Author: alex85k <alex85k at github.com>
Date: Fri Sep 26 19:55:41 2014 +0400
reorder libraries and add ws2_32 for MinGW
---
CMakeLists.txt | 62 ++++++++++++++++++++++++++++++----------------------------
1 file changed, 32 insertions(+), 30 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2213d7f..708cc3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,27 +35,11 @@ if(NOT THREADS_FOUND)
set(MISSING_LIB 1)
endif()
-find_package(ZLIB REQUIRED)
-include_directories(${ZLIB_INCLUDE_DIRS})
-list(APPEND LIBRARIES ${ZLIB_LIBRARIES})
-if(NOT ZLIB_FOUND)
- message(WARNING "Zlib not found!\n")
- set(MISSING_LIB 1)
-endif()
-
-find_package(BZip2 REQUIRED)
-include_directories(${BZIP2_INCLUDE_DIRS})
-list(APPEND LIBRARIES ${BZIP2_LIBRARIES})
-if(NOT BZIP2_FOUND)
- message(WARNING "BZip2 library not found!\n")
- set(MISSING_LIB 1)
-endif()
-
-find_package(EXPAT REQUIRED)
-include_directories(${EXPAT_INCLUDE_DIRS})
-list(APPEND LIBRARIES ${EXPAT_LIBRARIES})
-if(NOT EXPAT_FOUND)
- message(WARNING "Expat library not found!\n")
+find_package(OSMPBF REQUIRED)
+include_directories(${OSMPBF_INCLUDE_DIRS})
+list(APPEND LIBRARIES ${OSMPBF_LIBRARIES})
+if(NOT OSMPBF_FOUND)
+ message(WARNING "OSMPBF library not found!\n")
set(MISSING_LIB 1)
endif()
@@ -83,14 +67,6 @@ if(NOT CRYPTOPP_FOUND)
set(MISSING_LIB 1)
endif()
-find_package(OSMPBF REQUIRED)
-include_directories(${OSMPBF_INCLUDE_DIRS})
-list(APPEND LIBRARIES ${OSMPBF_LIBRARIES})
-if(NOT OSMPBF_FOUND)
- message(WARNING "OSMPBF library not found!\n")
- set(MISSING_LIB 1)
-endif()
-
find_package(Osmium REQUIRED)
include_directories(${OSMIUM_INCLUDE_DIRS})
if(NOT OSMIUM_FOUND)
@@ -98,6 +74,29 @@ if(NOT OSMIUM_FOUND)
set(MISSING_LIB 1)
endif()
+find_package(ZLIB REQUIRED)
+include_directories(${ZLIB_INCLUDE_DIRS})
+list(APPEND LIBRARIES ${ZLIB_LIBRARIES})
+if(NOT ZLIB_FOUND)
+ message(WARNING "Zlib not found!\n")
+ set(MISSING_LIB 1)
+endif()
+
+find_package(BZip2 REQUIRED)
+include_directories(${BZIP2_INCLUDE_DIRS})
+list(APPEND LIBRARIES ${BZIP2_LIBRARIES})
+if(NOT BZIP2_FOUND)
+ message(WARNING "BZip2 library not found!\n")
+ set(MISSING_LIB 1)
+endif()
+
+find_package(EXPAT REQUIRED)
+include_directories(${EXPAT_INCLUDE_DIRS})
+list(APPEND LIBRARIES ${EXPAT_LIBRARIES})
+if(NOT EXPAT_FOUND)
+ message(WARNING "Expat library not found!\n")
+ set(MISSING_LIB 1)
+endif()
#----------------------------------------------------------------------
#
@@ -217,7 +216,6 @@ add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64)
if(MSVC)
add_definitions(-wd4996 -DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS)
- list(APPEND LIBRARIES ws2_32)
else()
add_compile_options(-std=c++11)
add_compile_options(
@@ -237,6 +235,10 @@ else()
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g")
endif()
+if (WIN32)
+ list(APPEND LIBRARIES ws2_32)
+endif()
+
if(APPLE)
add_compile_options(-stdlib=libc++)
set(LDFLAGS ${LDFLAGS} -stdlib=libc++)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmium-tool.git
More information about the Pkg-grass-devel
mailing list