[libgeotiff] Fix libgeotiff link error

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
Hiroshi Miura 2018-02-16 13:32:22 +09:00
parent 6f92f7acc5
commit 67d3662845
4 changed files with 101 additions and 1 deletions

View File

@ -0,0 +1,64 @@
From 3a7c42f304ec3bb149e31bbd21c9c84048c3047c Mon Sep 17 00:00:00 2001
From: Hiroshi Miura <miurahr@linux.com>
Date: Thu, 15 Feb 2018 13:11:01 +0900
Subject: [PATCH 4/5] Fix libxtiff installation
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
---
CMakeLists.txt | 9 ++-------
libxtiff/CMakeLists.txt | 9 ---------
2 files changed, 2 insertions(+), 16 deletions(-)
delete mode 100644 libxtiff/CMakeLists.txt
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e2fe3d..c52cfb4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -354,11 +354,6 @@ INSTALL(FILES ${GEOTIFF_MAN_PAGES} DESTINATION share/man/man1)
# INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION ${GEOTIFF_INCLUDE_DIR})
INSTALL(FILES ${GEOTIFF_LIB_HEADERS} DESTINATION include)
-###############################################################################
-# Build libxtiff library
-
-ADD_SUBDIRECTORY(libxtiff)
-
###############################################################################
# Build libgeotiff library
@@ -406,6 +401,8 @@ FOREACH(epsg_csv_file ${GEOTIFF_CSV_DATA})
ENDIF()
ENDFOREACH()
+SET(XTIFF_SOURCES libxtiff/xtiff.c)
+
SET(EPSG_INCODE_EXPLANATION
"This file is autogenerated by CMake, based on the INCODE_EPSG_* options specified during configure.\n
Choosing an EPSG CSV file for inclusion into code will run csv/csv2c.py on the file and include the\n
@@ -414,8 +411,6 @@ STRING(REPLACE ";" "\n" EPSG_INCLUDEFILE_POINTER_STRING "${epsg_includefile_poin
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/epsg_incode_header.h"
"/* ${EPSG_INCODE_EXPLANATION} */\n${epsg_includefile_externconst}; \n\n/* Pointers to csv data included in code */\nstatic const datafile_t files[] = {\n${EPSG_INCLUDEFILE_POINTER_STRING}\n { NULL, NULL }};")
-SET(XTIFF_SOURCES libxtiff/xtiff.c)
-
if (MSVC OR CMAKE_CONFIGURATION_TYPES)
# For multi-config systems and for Visual Studio, the debug versions
# of the libraries have a _d suffix.
diff --git a/libxtiff/CMakeLists.txt b/libxtiff/CMakeLists.txt
deleted file mode 100644
index a0bbb96..0000000
--- a/libxtiff/CMakeLists.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-###############################################################################
-#
-# CMake configuration file to build libxtiff library
-#
-# Author: Mateusz Loskot <mateusz@loskot.net>
-#
-###############################################################################
-
-ADD_LIBRARY(xtiff STATIC xtiff.c)
--
2.16.1

View File

@ -0,0 +1,34 @@
From 84e537f3bd0db74b22ffebb3746d292daf4f4e59 Mon Sep 17 00:00:00 2001
From: Hiroshi Miura <miurahr@linux.com>
Date: Thu, 15 Feb 2018 13:17:14 +0900
Subject: [PATCH 5/5] Control shared library build with option
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
---
CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c52cfb4..5890203 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,14 +5,15 @@
# Author: Mateusz Loskot <mateusz@loskot.net>
#
###############################################################################
+CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
PROJECT(GeoTIFF)
SET(GEOTIFF_LIB_NAME geotiff)
SET(GEOTIFF_LIBRARY_TARGET geotiff_library)
+option(BUILD_SHARE_LIBS "Set ON to build shared library." ON)
##############################################################################
# CMake settings
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0)
SET(CMAKE_COLOR_MAKEFILE ON)
--
2.16.1

View File

@ -1,4 +1,4 @@
Source: libgeotiff
Version: 1.4.2-1
Version: 1.4.2-2
Description: Libgeotiff is an open source library normally hosted on top of libtiff for reading, and writing GeoTIFF information tags.
Build-Depends: tiff, proj4, zlib, libjpeg-turbo

View File

@ -16,6 +16,8 @@ vcpkg_apply_patches(
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"
"${CMAKE_CURRENT_LIST_DIR}/0004-Fix-libxtiff-installation.patch"
"${CMAKE_CURRENT_LIST_DIR}/0005-Control-shared-library-build-with-option.patch"
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)