mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 20:53:02 +08:00
[libgeotiff] Update patches
- 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 <miurahr@linux.com>
This commit is contained in:
parent
12b30c0f88
commit
6f92f7acc5
@ -0,0 +1,88 @@
|
||||
From 77b4bf4e649d55b1f1df38494114727f972ec806 Mon Sep 17 00:00:00 2001
|
||||
From: Howard Butler <hobu.inc@gmail.com>
|
||||
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 <miurahr@linux.com>
|
||||
---
|
||||
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}/@PROJECT_NAME_LOWER@-depends.cmake")
|
||||
|
||||
--
|
||||
2.16.1
|
||||
|
28
ports/libgeotiff/0002-Fix-directory-output.patch
Normal file
28
ports/libgeotiff/0002-Fix-directory-output.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 2b60f0a2c264bf3730e89739384a6d50991b2fc4 Mon Sep 17 00:00:00 2001
|
||||
From: Hiroshi Miura <miurahr@linux.com>
|
||||
Date: Wed, 14 Feb 2018 12:31:53 +0900
|
||||
Subject: [PATCH 2/5] Fix directory output
|
||||
|
||||
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
|
||||
---
|
||||
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
|
||||
|
@ -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 <miurahr@linux.com>
|
||||
Date: Wed, 14 Feb 2018 12:32:11 +0900
|
||||
Subject: [PATCH 3/5] Fix cmake TIFF detection
|
||||
|
||||
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
|
||||
---
|
||||
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
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff -urN a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
|
||||
--- a/cmake/CMakeLists.txt 2016-08-12 00:40:10.000000000 +0900
|
||||
+++ b/cmake/CMakeLists.txt 2018-02-09 07:12:40.422110239 +0900
|
||||
@@ -10,8 +10,8 @@
|
||||
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)
|
@ -13,8 +13,10 @@ vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-directory-output.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/fix-cmake-tiff-detection.patch")
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/0001-Updates-to-CMake-configuration-to-align-with-other-C.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/0002-Fix-directory-output.patch"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/0003-Fix-cmake-TIFF-detection.patch"
|
||||
)
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
|
Loading…
Reference in New Issue
Block a user