forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Import CMakeLists updates from libgeotiff trunk HEAD. It makes unify target name among static/shared libs. - Rebased patches and generated from git format-patch command. These two patches are as same code as previous one. - Publish patches on https://github.com/miurahr/libgeotiff Signed-off-by: Hiroshi Miura <[email protected]>
- Loading branch information
Showing
5 changed files
with
139 additions
and
20 deletions.
There are no files selected for viewing
88 changes: 88 additions & 0 deletions
88
ports/libgeotiff/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
From 77b4bf4e649d55b1f1df38494114727f972ec806 Mon Sep 17 00:00:00 2001 | ||
From: Howard Butler <[email protected]> | ||
Date: Mon, 11 Dec 2017 15:21:56 +0000 | ||
Subject: [PATCH 1/5] Updates to CMake configuration to align with other CMake | ||
norms (BUILD_SHARED_LIBS mostly) | ||
|
||
git-svn-id: https://svn.osgeo.org/metacrs/geotiff/trunk/libgeotiff@2801 4e78687f-474d-0410-85f9-8d5e500ac6b2 | ||
Signed-off-by: Hiroshi Miura <[email protected]> | ||
--- | ||
CMakeLists.txt | 22 ++-------------------- | ||
cmake/project-config.cmake.in | 5 ++++- | ||
2 files changed, 6 insertions(+), 21 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 0c70973..55ececf 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -9,7 +9,6 @@ PROJECT(GeoTIFF) | ||
|
||
SET(GEOTIFF_LIB_NAME geotiff) | ||
SET(GEOTIFF_LIBRARY_TARGET geotiff_library) | ||
-SET(GEOTIFF_ARCHIVE_TARGET geotiff_archive) | ||
|
||
############################################################################## | ||
# CMake settings | ||
@@ -416,32 +415,15 @@ FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/epsg_incode_header.h" | ||
|
||
SET(XTIFF_SOURCES libxtiff/xtiff.c) | ||
|
||
-#--- | ||
-# Static libgeotiff archive | ||
-# NOTE: Did not put XTIFF_SOURCES in static lib because libxtiff.a is written out | ||
-# currently. | ||
-#--- | ||
if (MSVC OR CMAKE_CONFIGURATION_TYPES) | ||
# For multi-config systems and for Visual Studio, the debug versions | ||
# of the libraries have a _d suffix. | ||
set (CMAKE_DEBUG_POSTFIX _d) | ||
endif () | ||
|
||
-ADD_LIBRARY(${GEOTIFF_ARCHIVE_TARGET} STATIC | ||
- ${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES}) | ||
-SET_TARGET_PROPERTIES(${GEOTIFF_ARCHIVE_TARGET} PROPERTIES | ||
- OUTPUT_NAME ${GEOTIFF_LIB_NAME}) | ||
- | ||
-# Shared libgeotiff library | ||
-ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET} SHARED | ||
+ADD_LIBRARY(${GEOTIFF_LIBRARY_TARGET} | ||
${GEOTIFF_LIB_SOURCES} ${GEOTIFF_LIB_CSV_SOURCES} ${XTIFF_SOURCES}) | ||
|
||
-# Windows: | ||
-IF(WIN32 AND MSVC) | ||
- SET_TARGET_PROPERTIES(${GEOTIFF_LIBRARY_TARGET} PROPERTIES IMPORT_SUFFIX "_i.lib") | ||
-ENDIF(WIN32 AND MSVC) | ||
- | ||
- | ||
# Unix, linux: | ||
IF(UNIX) | ||
SET_TARGET_PROPERTIES( | ||
@@ -478,7 +460,7 @@ TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET} | ||
# LIBRARY DESTINATION ${GEOTIFF_LIB_DIR} | ||
# ARCHIVE DESTINATION ${GEOTIFF_LIB_DIR}) | ||
|
||
-INSTALL( TARGETS ${GEOTIFF_ARCHIVE_TARGET} ${GEOTIFF_LIBRARY_TARGET} | ||
+INSTALL( TARGETS ${GEOTIFF_LIBRARY_TARGET} | ||
EXPORT depends | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION lib | ||
diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in | ||
index 6b5499f..dc5b999 100644 | ||
--- a/cmake/project-config.cmake.in | ||
+++ b/cmake/project-config.cmake.in | ||
@@ -32,8 +32,11 @@ set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin") | ||
|
||
message (STATUS " include directory: \${@PROJECT_NAME@_INCLUDE_DIRS}") | ||
|
||
+if(BUILD_SHARED_LIBS) | ||
set (@PROJECT_NAME@_SHARED_LIBRARIES @GEOTIFF_LIBRARY_TARGET@) | ||
-set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_ARCHIVE_TARGET@) | ||
+else() | ||
+set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_LIBRARY_TARGET@) | ||
+endif() | ||
# Read in the exported definition of the library | ||
include ("${_DIR}/@[email protected]") | ||
|
||
-- | ||
2.16.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From 2b60f0a2c264bf3730e89739384a6d50991b2fc4 Mon Sep 17 00:00:00 2001 | ||
From: Hiroshi Miura <[email protected]> | ||
Date: Wed, 14 Feb 2018 12:31:53 +0900 | ||
Subject: [PATCH 2/5] Fix directory output | ||
|
||
Signed-off-by: Hiroshi Miura <[email protected]> | ||
--- | ||
cmake/CMakeLists.txt | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt | ||
index 47a2b00..b41f2fa 100644 | ||
--- a/cmake/CMakeLists.txt | ||
+++ b/cmake/CMakeLists.txt | ||
@@ -10,8 +10,8 @@ if (NOT WIN32) | ||
set (INSTALL_CMAKE_DIR "share/cmake/${PROJECT_NAME}") | ||
set (PROJECT_ROOT_DIR "../../..") | ||
else () | ||
- set (INSTALL_CMAKE_DIR "cmake") | ||
- set (PROJECT_ROOT_DIR "..") | ||
+ set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME}") | ||
+ set (PROJECT_ROOT_DIR "../..") | ||
endif () | ||
|
||
configure_file (project-config.cmake.in project-config.cmake @ONLY) | ||
-- | ||
2.16.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,18 @@ | ||
--- a/CMakeLists.txt 2016-08-12 00:40:12.000000000 +0900 | ||
+++ b/CMakeLists.txt 2018-02-09 13:27:05.721561755 +0900 | ||
@@ -192,7 +192,8 @@ | ||
From bc0003ab3d94f271b27f6897259b734709a5d6cf Mon Sep 17 00:00:00 2001 | ||
From: Hiroshi Miura <[email protected]> | ||
Date: Wed, 14 Feb 2018 12:32:11 +0900 | ||
Subject: [PATCH 3/5] Fix cmake TIFF detection | ||
|
||
Signed-off-by: Hiroshi Miura <[email protected]> | ||
--- | ||
CMakeLists.txt | 5 +++-- | ||
1 file changed, 3 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 55ececf..1e2fe3d 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -191,7 +191,8 @@ IF(WITH_TIFF) | ||
IF(TIFF_FOUND) | ||
# Confirm required API is available | ||
INCLUDE(CheckFunctionExists) | ||
|
@@ -10,7 +22,7 @@ | |
|
||
CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN) | ||
IF(NOT HAVE_TIFFOPEN) | ||
@@ -205,7 +206,7 @@ | ||
@@ -204,7 +205,7 @@ IF(WITH_TIFF) | ||
SET(TIFF_FOUND) # ReSET to NOT found for TIFF library | ||
MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFMergeFieldInfo function not found. libtiff 3.6.0 Beta or later required. Please upgrade or use an older version of libgeotiff") | ||
ENDIF() | ||
|
@@ -19,3 +31,6 @@ | |
INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR}) | ||
ADD_DEFINITIONS(-DHAVE_TIFF=1) | ||
ENDIF(TIFF_FOUND) | ||
-- | ||
2.16.1 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters