mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 06:08:03 +08:00
[LibLZMA] automatic configuration (#6000)
* [LibLZMA] add a config-generated by CMake * bump control files of LibLZMA and dependent ports * [tiff] use proper liblzma target [OpenCV] add an explicit dependency on LibLZMA for static linking * [liblzma] fix header install path * [LibLZMA] avoid using targets in old symbols * fixes for windows-static and trying to see if CI is happier with a share/lib folder written in lowercase * [LibLZMA] use only modern CMake language, remove patch in favour of target public definition * [lzma] put symbols in cmake cache * [libxmlpp] remove CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS regression * [lzma] fix header install path * [liblzma] install wrapper to force config mode * [liblzma] remove function check inside cmake config since we know it will pass * [liblzma] wrapper fix * [tiff,geotiff] general cleanup and patch fixes * [libgeotiff] remove debug tools * [tesseract] modernize * [tiff] fix also tiff_library symbol * [pdal,libgeotiff] better library integration * [tiff] restore using unix i/o on UWP, since it was working... for sure win32 one cannot work * [tiff] enable lzma also on uwp, since it works and is requested by many dependencies * [selene] enable build on arm/arm64-windows, which was surely broken before * [lzma] uniform naming with cmake 3.14 * [podofo] fix regression, it requires openssl which was disabled in dependencies * [many ports] remove unnecessary mods * [boost-iostream] chmod * [openssl] fix regression due to missing architecture * [podofo] fix regression on uwp due to missing include * [libpq] explicitly fail on UWP, it should avoid being marked as regression * [shiva] fix regression on linux
This commit is contained in:
parent
3d4b4c02ed
commit
a9303736fd
@ -1,88 +0,0 @@
|
||||
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
|
||||
|
@ -1,28 +0,0 @@
|
||||
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,64 +0,0 @@
|
||||
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
|
||||
|
@ -1,34 +0,0 @@
|
||||
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
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 2625b4a85b6cacf9b6ede3cf30af16eb795044e9 Mon Sep 17 00:00:00 2001
|
||||
From: Hiroshi Miura <miurahr@linux.com>
|
||||
Date: Sat, 24 Feb 2018 08:36:31 +0900
|
||||
Subject: [PATCH 6/6] Fix utility link error
|
||||
|
||||
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
|
||||
---
|
||||
bin/CMakeLists.txt | 7 +------
|
||||
1 file changed, 1 insertion(+), 6 deletions(-)
|
||||
|
||||
diff --git a/bin/CMakeLists.txt b/bin/CMakeLists.txt
|
||||
index 583ae36..6c6cc21 100644
|
||||
--- a/bin/CMakeLists.txt
|
||||
+++ b/bin/CMakeLists.txt
|
||||
@@ -6,10 +6,6 @@
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
-INCLUDE_DIRECTORIES(
|
||||
- .
|
||||
- ${CMAKE_SOURCE_DIR})
|
||||
-
|
||||
IF(WIN32 AND MSVC)
|
||||
SET(GETOPT_SOURCE getopt.c)
|
||||
ENDIF()
|
||||
@@ -22,12 +18,11 @@ MESSAGE(STATUS "Adding GeoTIFF utilities to build")
|
||||
|
||||
FOREACH(utility ${GEOTIFF_UTILITIES})
|
||||
ADD_EXECUTABLE(${utility} ${utility}.c ${GETOPT_SOURCE})
|
||||
- TARGET_LINK_LIBRARIES(${utility} xtiff ${GEOTIFF_LIBRARY_TARGET})
|
||||
+ TARGET_LINK_LIBRARIES(${utility} ${GEOTIFF_LIBRARY_TARGET})
|
||||
ENDFOREACH()
|
||||
|
||||
ADD_EXECUTABLE(geotifcp geotifcp.c ${GETOPT_SOURCE})
|
||||
TARGET_LINK_LIBRARIES(geotifcp
|
||||
- xtiff
|
||||
${GEOTIFF_LIBRARY_TARGET}
|
||||
${JPEG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES})
|
||||
--
|
||||
2.16.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: libgeotiff
|
||||
Version: 1.4.2-8
|
||||
Description: Libgeotiff is an open source library normally hosted on top of libtiff for reading, and writing GeoTIFF information tags.
|
||||
Version: 1.4.2-9
|
||||
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
|
||||
|
124
ports/libgeotiff/cmakelists.patch
Normal file
124
ports/libgeotiff/cmakelists.patch
Normal file
@ -0,0 +1,124 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 0c70973..617978c 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -190,22 +190,6 @@ IF(WITH_TIFF)
|
||||
endif ()
|
||||
|
||||
IF(TIFF_FOUND)
|
||||
- # Confirm required API is available
|
||||
- INCLUDE(CheckFunctionExists)
|
||||
- SET(CMAKE_REQUIRED_LIBRARIES ${TIFF_LIBRARIES})
|
||||
-
|
||||
- CHECK_FUNCTION_EXISTS(TIFFOpen HAVE_TIFFOPEN)
|
||||
- IF(NOT HAVE_TIFFOPEN)
|
||||
- SET(TIFF_FOUND) # ReSET to NOT found for TIFF library
|
||||
- MESSAGE(FATAL_ERROR "Failed to link with libtiff - TIFFOpen function not found")
|
||||
- ENDIF()
|
||||
-
|
||||
- CHECK_FUNCTION_EXISTS(TIFFMergeFieldInfo HAVE_TIFFMERGEFIELDINFO)
|
||||
- IF(NOT HAVE_TIFFMERGEFIELDINFO)
|
||||
- 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()
|
||||
-
|
||||
INCLUDE_DIRECTORIES(${TIFF_INCLUDE_DIR})
|
||||
ADD_DEFINITIONS(-DHAVE_TIFF=1)
|
||||
ENDIF(TIFF_FOUND)
|
||||
@@ -354,11 +338,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
|
||||
|
||||
@@ -427,13 +406,9 @@ if (MSVC OR CMAKE_CONFIGURATION_TYPES)
|
||||
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:
|
||||
@@ -478,7 +453,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/bin/CMakeLists.txt b/bin/CMakeLists.txt
|
||||
index 7b12341..b6b1d0c 100644
|
||||
--- a/bin/CMakeLists.txt
|
||||
+++ b/bin/CMakeLists.txt
|
||||
@@ -6,9 +6,6 @@
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
-INCLUDE_DIRECTORIES(
|
||||
- .
|
||||
- ${CMAKE_SOURCE_DIR})
|
||||
|
||||
IF(WIN32 AND MSVC)
|
||||
SET(GETOPT_SOURCE getopt.c)
|
||||
@@ -22,12 +19,11 @@ MESSAGE(STATUS "Adding GeoTIFF utilities to build")
|
||||
|
||||
FOREACH(utility ${GEOTIFF_UTILITIES})
|
||||
ADD_EXECUTABLE(${utility} ${utility}.c ${GETOPT_SOURCE})
|
||||
- TARGET_LINK_LIBRARIES(${utility} xtiff ${GEOTIFF_LIBRARY_TARGET})
|
||||
+ TARGET_LINK_LIBRARIES(${utility} ${GEOTIFF_LIBRARY_TARGET})
|
||||
ENDFOREACH()
|
||||
|
||||
ADD_EXECUTABLE(geotifcp geotifcp.c ${GETOPT_SOURCE})
|
||||
TARGET_LINK_LIBRARIES(geotifcp
|
||||
- xtiff
|
||||
${GEOTIFF_LIBRARY_TARGET}
|
||||
${JPEG_LIBRARIES}
|
||||
${ZLIB_LIBRARIES})
|
||||
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
|
||||
index 47a2b00..ffbd004 100644
|
||||
--- a/cmake/CMakeLists.txt
|
||||
+++ b/cmake/CMakeLists.txt
|
||||
@@ -6,13 +6,8 @@
|
||||
# ${INSTALL_CMAKE_DIR} and @PROJECT_ROOT_DIR@ is the relative
|
||||
# path to the root from there. (Note that the whole install tree can
|
||||
# be relocated.)
|
||||
-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 "..")
|
||||
-endif ()
|
||||
+ set (INSTALL_CMAKE_DIR "share/${PROJECT_NAME}")
|
||||
+ set (PROJECT_ROOT_DIR "../..")
|
||||
|
||||
configure_file (project-config.cmake.in project-config.cmake @ONLY)
|
||||
configure_file (project-config-version.cmake.in
|
||||
diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
|
||||
index 6b5499f..e4ddd11 100644
|
||||
--- a/cmake/project-config.cmake.in
|
||||
+++ b/cmake/project-config.cmake.in
|
||||
@@ -33,7 +33,7 @@ set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/bin")
|
||||
message (STATUS " include directory: \${@PROJECT_NAME@_INCLUDE_DIRS}")
|
||||
|
||||
set (@PROJECT_NAME@_SHARED_LIBRARIES @GEOTIFF_LIBRARY_TARGET@)
|
||||
-set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_ARCHIVE_TARGET@)
|
||||
+set (@PROJECT_NAME@_STATIC_LIBRARIES @GEOTIFF_LIBRARY_TARGET@)
|
||||
# Read in the exported definition of the library
|
||||
include ("${_DIR}/@PROJECT_NAME_LOWER@-depends.cmake")
|
||||
|
@ -1,12 +1,11 @@
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
set(LIBGEOTIFF_VERSION 1.4.2)
|
||||
set(LIBGEOTIFF_HASH 059c6e05eb0c47f17b102c7217a2e1636e76d622c4d1bdcf0bd89fb3505f3130bffa881e21c73cfd2ca0d6863b81322f85784658ba3539b53b63c3a8f38d1deb)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz"
|
||||
FILENAME "libgeotiff-${LIBGEOTIFF_VERSION}.tar.gz"
|
||||
SHA512 ${LIBGEOTIFF_HASH}
|
||||
SHA512 059c6e05eb0c47f17b102c7217a2e1636e76d622c4d1bdcf0bd89fb3505f3130bffa881e21c73cfd2ca0d6863b81322f85784658ba3539b53b63c3a8f38d1deb
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
@ -14,11 +13,7 @@ vcpkg_extract_source_archive_ex(
|
||||
ARCHIVE ${ARCHIVE}
|
||||
REF ${LIBGEOTIFF_VERSION}
|
||||
PATCHES
|
||||
0001-Updates-to-CMake-configuration-to-align-with-other-C.patch
|
||||
0002-Fix-directory-output.patch
|
||||
0004-Fix-libxtiff-installation.patch
|
||||
0005-Control-shared-library-build-with-option.patch
|
||||
0006-Fix-utility-link-error.patch
|
||||
cmakelists.patch
|
||||
geotiff-config.patch
|
||||
)
|
||||
|
||||
@ -33,42 +28,40 @@ vcpkg_configure_cmake(
|
||||
-DWITH_PROJ4=ON
|
||||
-DWITH_ZLIB=ON
|
||||
-DWITH_JPEG=ON
|
||||
OPTIONS_RELEASE -DWITH_UTILITIES=ON
|
||||
OPTIONS_DEBUG -DWITH_UTILITIES=OFF
|
||||
-DWITH_UTILITIES=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
if(WIN32)
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/GeoTIFF)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgeotiff ${CURRENT_PACKAGES_DIR}/share/geotiff) # move configs to expected location
|
||||
else()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/cmake/GeoTIFF)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libgeotiff ${CURRENT_PACKAGES_DIR}/share/geotiff) # move configs to expected location
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
configure_file(${SOURCE_PATH}/COPYING ${CURRENT_PACKAGES_DIR}/share/libgeotiff/copyright COPYONLY)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
else()
|
||||
file(GLOB GEOTIFF_UTILS ${CURRENT_PACKAGES_DIR}/bin/*.exe)
|
||||
file(GLOB GEOTIFF_UTILS_DEBUG ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
||||
file(REMOVE ${GEOTIFF_UTILS_DEBUG})
|
||||
endif()
|
||||
|
||||
file(COPY ${GEOTIFF_UTILS} DESTINATION ${CURRENT_PACKAGES_DIR}/tools/libgeotiff)
|
||||
vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/libgeotiff)
|
||||
file(REMOVE ${GEOTIFF_UTILS})
|
||||
|
||||
file(GLOB EXES ${CURRENT_PACKAGES_DIR}/bin/*.exe ${CURRENT_PACKAGES_DIR}/debug/bin/*.exe)
|
||||
if(EXES)
|
||||
file(REMOVE ${EXES})
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR (VCPKG_CMAKE_SYSTEM_NAME AND NOT VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore"))
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin ${CURRENT_PACKAGES_DIR}/bin)
|
||||
endif()
|
||||
|
||||
# Move and cleanup doc files
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/doc ${CURRENT_PACKAGES_DIR}/share/libgeotiff/doc)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/doc)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/GeoTIFF)
|
||||
file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-config-version.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
|
||||
file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-config.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
|
||||
file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends-release.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
|
||||
file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends-debug.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
|
||||
file(INSTALL ${CURRENT_PACKAGES_DIR}/share/libgeotiff/geotiff-depends.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/geotiff)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/libgeotiff RENAME copyright)
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/doc ${CURRENT_PACKAGES_DIR}/share/libgeotiff/doc)
|
||||
|
@ -1,22 +1,15 @@
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(liblzma)
|
||||
project(LibLZMA)
|
||||
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
if(BUILD_SHARED_LIBS)
|
||||
add_definitions(-DLIBLZMADLL_EXPORTS)
|
||||
add_definitions(-DDLL_EXPORT)
|
||||
endif()
|
||||
set(INSTALL_BIN_DIR "bin" CACHE PATH "Path where exe and dll will be installed")
|
||||
set(INSTALL_LIB_DIR "lib" CACHE PATH "Path where lib will be installed")
|
||||
set(INSTALL_INCLUDE_DIR "include" CACHE PATH "Path where headers will be installed")
|
||||
set(INSTALL_CMAKE_DIR "share/liblzma" CACHE PATH "Path where cmake configs will be installed")
|
||||
set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Append a suffix to debug libraries")
|
||||
|
||||
if(NOT MSVC)
|
||||
add_definitions(-DHAVE_VISIBILITY=1)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
include_directories(windows/vs2017)
|
||||
else()
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
if(NOT WIN32)
|
||||
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/config.h
|
||||
"""
|
||||
"
|
||||
#define TUKLIB_SYMBOL_PREFIX lzma_
|
||||
#define ASSUME_RAM 128
|
||||
#define HAVE_CHECK_CRC32 1
|
||||
@ -58,19 +51,10 @@ else()
|
||||
#define PACKAGE_NAME \"XZ Utils\"
|
||||
#define PACKAGE_URL \"http://tukaani.org/xz/\"
|
||||
#define SIZEOF_SIZE_T (sizeof(size_t))
|
||||
""")
|
||||
")
|
||||
endif()
|
||||
include_directories(src/liblzma/common)
|
||||
include_directories(src/common)
|
||||
include_directories(src/liblzma/api)
|
||||
include_directories(src/liblzma/check)
|
||||
include_directories(src/liblzma/delta)
|
||||
include_directories(src/liblzma/lz)
|
||||
include_directories(src/liblzma/lzma)
|
||||
include_directories(src/liblzma/rangecoder)
|
||||
include_directories(src/liblzma/simple)
|
||||
|
||||
add_library(lzma
|
||||
add_library(LibLZMA
|
||||
src/common/tuklib_cpucores.c
|
||||
src/common/tuklib_physmem.c
|
||||
src/liblzma/check/check.c
|
||||
@ -143,14 +127,56 @@ add_library(lzma
|
||||
src/liblzma/simple/simple_decoder.c
|
||||
src/liblzma/simple/simple_encoder.c
|
||||
src/liblzma/simple/sparc.c
|
||||
src/liblzma/simple/x86.c)
|
||||
src/liblzma/simple/x86.c
|
||||
)
|
||||
|
||||
install(TARGETS lzma
|
||||
RUNTIME DESTINATION bin
|
||||
ARCHIVE DESTINATION lib
|
||||
LIBRARY DESTINATION lib)
|
||||
|
||||
if(NOT LIBLZMA_SKIP_HEADERS)
|
||||
install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma DESTINATION include)
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma.h DESTINATION include)
|
||||
if(MSVC)
|
||||
target_include_directories(LibLZMA PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/windows/vs2017>)
|
||||
else()
|
||||
target_compile_definitions(LibLZMA PRIVATE -DHAVE_VISIBILITY=1)
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
target_compile_definitions(LibLZMA PRIVATE -DDLL_EXPORT)
|
||||
target_compile_definitions(LibLZMA PUBLIC -DLIBLZMADLL_EXPORTS)
|
||||
else()
|
||||
target_compile_definitions(LibLZMA PUBLIC -DLZMA_API_STATIC)
|
||||
endif()
|
||||
target_compile_definitions(LibLZMA PUBLIC -DHAVE_CONFIG_H)
|
||||
|
||||
target_include_directories(LibLZMA PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src/liblzma/common>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src/common>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src/liblzma/check>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src/liblzma/delta>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src/liblzma/lz>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src/liblzma/rangecoder>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src/liblzma/simple>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src/liblzma/lzma>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/src/liblzma/api>
|
||||
$<INSTALL_INTERFACE:${INSTALL_INCLUDE_DIR}>
|
||||
)
|
||||
|
||||
set_target_properties(LibLZMA PROPERTIES OUTPUT_NAME "lzma")
|
||||
|
||||
set_target_properties(LibLZMA PROPERTIES PUBLIC_HEADER
|
||||
"${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/base.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/bcj.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/block.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/check.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/container.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/delta.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/filter.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/hardware.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/index.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/index_hash.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/lzma12.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/stream_flags.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/version.h;${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma/vli.h"
|
||||
)
|
||||
|
||||
install(TARGETS LibLZMA EXPORT LibLZMATargets
|
||||
RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
|
||||
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
|
||||
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
|
||||
PUBLIC_HEADER DESTINATION "${INSTALL_INCLUDE_DIR}/lzma"
|
||||
)
|
||||
|
||||
install(FILES "${PROJECT_SOURCE_DIR}/src/liblzma/api/lzma.h"
|
||||
DESTINATION "${INSTALL_INCLUDE_DIR}"
|
||||
)
|
||||
|
||||
install(EXPORT LibLZMATargets
|
||||
FILE LibLZMAConfig.cmake
|
||||
NAMESPACE LibLZMA::
|
||||
DESTINATION "${INSTALL_CMAKE_DIR}"
|
||||
)
|
||||
|
@ -1,3 +1,3 @@
|
||||
Source: liblzma
|
||||
Version: 5.2.4-1
|
||||
Description: Compression library with an API similar to that of zlib.
|
||||
Source: liblzma
|
||||
Version: 5.2.4-2
|
||||
Description: Compression library with an API similar to that of zlib.
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff --git a/lzma.h b/lzma.h
|
||||
index ce675a7..ac0fc98 100644
|
||||
--- a/lzma.h
|
||||
+++ b/lzma.h
|
||||
@@ -187,6 +187,9 @@
|
||||
* need to worry about LZMA_API_STATIC. Also the calling convention is
|
||||
* omitted on Cygwin but not on MinGW.
|
||||
*/
|
||||
+
|
||||
+#define LZMA_API_STATIC
|
||||
+
|
||||
#ifndef LZMA_API_IMPORT
|
||||
# if !defined(LZMA_API_STATIC) && defined(_WIN32) && !defined(__GNUC__)
|
||||
# define LZMA_API_IMPORT __declspec(dllimport)
|
@ -15,21 +15,67 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS_DEBUG
|
||||
-DLIBLZMA_SKIP_HEADERS=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${CURRENT_PACKAGES_DIR}/include
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/auto-define-lzma-api-static.patch)
|
||||
file(APPEND ${CURRENT_PACKAGES_DIR}/share/liblzma/LibLZMAConfig.cmake
|
||||
"
|
||||
include(\${CMAKE_ROOT}/Modules/SelectLibraryConfigurations.cmake)
|
||||
find_path(LibLZMA_INCLUDE_DIR
|
||||
NAMES lzma.h
|
||||
PATH_SUFFIXES lzma
|
||||
)
|
||||
if(NOT LibLZMA_LIBRARY)
|
||||
find_library(LibLZMA_LIBRARY_RELEASE NAMES lzma LZMA LibLZMA PATHS \${_IMPORT_PREFIX}/lib/)
|
||||
find_library(LibLZMA_LIBRARY_DEBUG NAMES lzmad LZMAd LibLZMAd PATHS \${_IMPORT_PREFIX}/debug/lib/)
|
||||
select_library_configurations(LibLZMA)
|
||||
endif()
|
||||
set(LibLZMA_INCLUDE_DIRS \${LibLZMA_INCLUDE_DIR} CACHE PATH \"\")
|
||||
set(LibLZMA_LIBRARIES \${LibLZMA_LIBRARY} CACHE STRING \"\")
|
||||
set(LZMA_INCLUDE_DIR \${LibLZMA_INCLUDE_DIR} CACHE PATH \"\")
|
||||
set(LZMA_LIBRARY \${LibLZMA_LIBRARY} CACHE STRING \"\")
|
||||
set(LZMA_INCLUDE_DIRS \${LibLZMA_INCLUDE_DIR} CACHE PATH \"\")
|
||||
set(LZMA_LIBRARIES \${LibLZMA_LIBRARY} CACHE STRING \"\")
|
||||
set(LIBLZMA_INCLUDE_DIRS \${LibLZMA_INCLUDE_DIR} CACHE PATH \"\")
|
||||
set(LIBLZMA_LIBRARIES \${LibLZMA_LIBRARY} CACHE STRING \"\")
|
||||
set(LIBLZMA_INCLUDE_DIR \${LibLZMA_INCLUDE_DIR} CACHE PATH \"\")
|
||||
set(LIBLZMA_LIBRARY \${LibLZMA_LIBRARY} CACHE STRING \"\")
|
||||
|
||||
if(LIBLZMA_INCLUDE_DIR AND EXISTS \"\${LIBLZMA_INCLUDE_DIR}/lzma/version.h\")
|
||||
file(STRINGS \"\${LIBLZMA_INCLUDE_DIR}/lzma/version.h\" LIBLZMA_HEADER_CONTENTS REGEX \"#define LZMA_VERSION_[A-Z]+ [0-9]+\")
|
||||
|
||||
string(REGEX REPLACE \".*#define LZMA_VERSION_MAJOR ([0-9]+).*\" \"\\\\1\" LIBLZMA_VERSION_MAJOR \"\${LIBLZMA_HEADER_CONTENTS}\")
|
||||
string(REGEX REPLACE \".*#define LZMA_VERSION_MINOR ([0-9]+).*\" \"\\\\1\" LIBLZMA_VERSION_MINOR \"\${LIBLZMA_HEADER_CONTENTS}\")
|
||||
string(REGEX REPLACE \".*#define LZMA_VERSION_PATCH ([0-9]+).*\" \"\\\\1\" LIBLZMA_VERSION_PATCH \"\${LIBLZMA_HEADER_CONTENTS}\")
|
||||
|
||||
set(LIBLZMA_VERSION_STRING \"\${LIBLZMA_VERSION_MAJOR}.\${LIBLZMA_VERSION_MINOR}.\${LIBLZMA_VERSION_PATCH}\")
|
||||
unset(LIBLZMA_HEADER_CONTENTS)
|
||||
endif()
|
||||
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/liblzma/COPYING ${CURRENT_PACKAGES_DIR}/share/liblzma/copyright)
|
||||
## We're using new code known now as XZ, even library still been called LZMA
|
||||
## it can be found in http://tukaani.org/xz/
|
||||
## Avoid using old codebase
|
||||
#if (LIBLZMA_LIBRARY)
|
||||
# include(\${CMAKE_ROOT}/Modules/CheckLibraryExists.cmake)
|
||||
# CHECK_LIBRARY_EXISTS(\${LibLZMA_LIBRARY_RELEASE} lzma_auto_decoder \"\" LIBLZMA_HAS_AUTO_DECODER)
|
||||
# CHECK_LIBRARY_EXISTS(\${LibLZMA_LIBRARY_RELEASE} lzma_easy_encoder \"\" LIBLZMA_HAS_EASY_ENCODER)
|
||||
# CHECK_LIBRARY_EXISTS(\${LibLZMA_LIBRARY_RELEASE} lzma_lzma_preset \"\" LIBLZMA_HAS_LZMA_PRESET)
|
||||
#endif ()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma)
|
||||
set(LibLZMA_FOUND TRUE CACHE BOOL \"\")
|
||||
set(LZMA_FOUND TRUE CACHE BOOL \"\")
|
||||
set(LIBLZMA_FOUND TRUE CACHE BOOL \"\")
|
||||
")
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(APPEND ${CURRENT_PACKAGES_DIR}/share/liblzma/LibLZMAConfig.cmake "add_definitions(-DLZMA_API_STATIC)")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/liblzma RENAME copyright)
|
||||
|
@ -1,5 +0,0 @@
|
||||
The package liblzma is compatible with built-in CMake targets:
|
||||
|
||||
find_package(LibLZMA REQUIRED)
|
||||
target_include_directories(main PRIVATE ${LIBLZMA_INCLUDE_DIRS})
|
||||
target_link_libraries(main PRIVATE ${LIBLZMA_LIBRARIES})
|
4
ports/liblzma/vcpkg-cmake-wrapper.cmake
Normal file
4
ports/liblzma/vcpkg-cmake-wrapper.cmake
Normal file
@ -0,0 +1,4 @@
|
||||
list(REMOVE_ITEM ARGS "NO_MODULE")
|
||||
list(REMOVE_ITEM ARGS "CONFIG")
|
||||
list(REMOVE_ITEM ARGS "MODULE")
|
||||
_find_package(${ARGS} CONFIG)
|
@ -1,11 +1,19 @@
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/postgresql-9.6.3)
|
||||
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
message(FATAL_ERROR "${PORT} currently only supports being built for desktop")
|
||||
endif()
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://ftp.postgresql.org/pub/source/v9.6.3/postgresql-9.6.3.tar.bz2"
|
||||
FILENAME "postgresql-9.6.3.tar.bz2"
|
||||
SHA512 97141972e154e6b0e756ee6a4e20f26e82022a9fd4c56305314a3a5567a79ece638e4ac3d513b46138737ae6bd27a098f30013a94767db151181aac9c01290a1
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: libspatialite
|
||||
Version: 4.3.0a-2
|
||||
Version: 4.3.0a-3
|
||||
Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.
|
||||
Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv
|
||||
|
||||
|
@ -33,10 +33,10 @@ else()
|
||||
set(GEOS_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libgeos_c.lib ${CURRENT_INSTALLED_DIR}/lib/libgeos.lib")
|
||||
set(GEOS_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libgeos_cd.lib ${CURRENT_INSTALLED_DIR}/debug/lib/libgeosd.lib")
|
||||
set(LIBXML2_LIBS_REL "${CURRENT_INSTALLED_DIR}/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/lib/lzma.lib ws2_32.lib")
|
||||
set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzma.lib ws2_32.lib")
|
||||
set(LIBXML2_LIBS_DBG "${CURRENT_INSTALLED_DIR}/debug/lib/libxml2.lib ${CURRENT_INSTALLED_DIR}/debug/lib/lzmad.lib ws2_32.lib")
|
||||
endif()
|
||||
|
||||
set(LIBS_ALL_DBG
|
||||
set(LIBS_ALL_DBG
|
||||
"${CURRENT_INSTALLED_DIR}/debug/lib/libiconv.lib \
|
||||
${CURRENT_INSTALLED_DIR}/debug/lib/libcharset.lib \
|
||||
${CURRENT_INSTALLED_DIR}/debug/lib/sqlite3.lib \
|
||||
@ -46,7 +46,7 @@ set(LIBS_ALL_DBG
|
||||
${GEOS_LIBS_DBG} \
|
||||
${CURRENT_INSTALLED_DIR}/debug/lib/projd.lib"
|
||||
)
|
||||
set(LIBS_ALL_REL
|
||||
set(LIBS_ALL_REL
|
||||
"${CURRENT_INSTALLED_DIR}/lib/libiconv.lib \
|
||||
${CURRENT_INSTALLED_DIR}/lib/libcharset.lib \
|
||||
${CURRENT_INSTALLED_DIR}/lib/sqlite3.lib \
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: opencv
|
||||
Version: 3.4.3-7
|
||||
Version: 3.4.3-8
|
||||
Build-Depends: zlib
|
||||
Description: computer vision library
|
||||
Default-Features: opengl, jpeg, png, tiff, eigen, flann
|
||||
|
@ -394,6 +394,14 @@ string(REPLACE "${CURRENT_INSTALLED_DIR}"
|
||||
"\${_VCPKG_INSTALLED_DIR}/\${VCPKG_TARGET_TRIPLET}" OPENCV_MODULES "${OPENCV_MODULES}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake "${OPENCV_MODULES}")
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake OPENCV_MODULES)
|
||||
string(REPLACE "set(CMAKE_IMPORT_FILE_VERSION 1)"
|
||||
"set(CMAKE_IMPORT_FILE_VERSION 1)
|
||||
find_package(TIFF REQUIRED)" OPENCV_MODULES "${OPENCV_MODULES}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/opencv/OpenCVModules.cmake "${OPENCV_MODULES}")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
|
@ -8,6 +8,8 @@ endif()
|
||||
|
||||
if (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
||||
set(UWP_PLATFORM "arm")
|
||||
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64")
|
||||
set(UWP_PLATFORM "arm64")
|
||||
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
set(UWP_PLATFORM "x64")
|
||||
elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "x86")
|
||||
|
@ -1,13 +0,0 @@
|
||||
find_path(GEOTIFF_INCLUDE_DIR geotiff.h)
|
||||
|
||||
find_library(GEOTIFF_LIBRARY_DEBUG NAMES geotiff_d)
|
||||
find_library(GEOTIFF_LIBRARY_RELEASE NAMES geotiff)
|
||||
|
||||
include(SelectLibraryConfigurations)
|
||||
select_library_configurations(GEOTIFF)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
GEOTIFF DEFAULT_MSG
|
||||
GEOTIFF_LIBRARY GEOTIFF_INCLUDE_DIR
|
||||
)
|
@ -21,14 +21,10 @@ vcpkg_extract_source_archive_ex(
|
||||
)
|
||||
|
||||
file(REMOVE "${SOURCE_PATH}/pdal/gitsha.cpp")
|
||||
|
||||
# Deploy custom CMake modules to enforce expected dependencies look-up
|
||||
foreach(_module IN ITEMS FindGDAL FindGEOS FindGeoTIFF)
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/modules/${_module}.cmake")
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/${_module}.cmake
|
||||
DESTINATION ${SOURCE_PATH}/cmake/modules/
|
||||
)
|
||||
endforeach()
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindGDAL.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindGEOS.cmake")
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindGDAL.cmake DESTINATION ${SOURCE_PATH}/cmake/modules/)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/FindGEOS.cmake DESTINATION ${SOURCE_PATH}/cmake/modules/)
|
||||
|
||||
# NOTE: CMake native BUILD_SHARED_LIBS option will be set by vcpkg_configure_cmake
|
||||
# TODO: Remove this as soon as PDAL switches to use BUILD_SHARED_LIBS
|
||||
|
15
ports/podofo/0003-uwp_fix.patch
Normal file
15
ports/podofo/0003-uwp_fix.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/src/base/PdfCompilerCompat.h b/src/base/PdfCompilerCompat.h
|
||||
index 706875f..8efb349 100644
|
||||
--- a/src/base/PdfCompilerCompat.h
|
||||
+++ b/src/base/PdfCompilerCompat.h
|
||||
@@ -113,6 +113,10 @@
|
||||
#define NOMINMAX
|
||||
#endif
|
||||
|
||||
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
|
||||
+#include <combaseapi.h>
|
||||
+#endif
|
||||
+
|
||||
// Integer types - fixed size types guaranteed to work anywhere
|
||||
// because we detect the right underlying type name to use with
|
||||
// CMake. Use typedefs rather than macros for saner error messages
|
@ -1,7 +1,7 @@
|
||||
Source: podofo
|
||||
Version: 0.9.6-6
|
||||
Version: 0.9.6-7
|
||||
Description: PoDoFo is a library to work with the PDF file format
|
||||
Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl (!windows&!uwp), freetype
|
||||
Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openssl, freetype
|
||||
|
||||
Feature: fontconfig
|
||||
Description: Enable font manager support on Unix platforms.
|
||||
|
@ -6,13 +6,19 @@ vcpkg_download_distfile(ARCHIVE
|
||||
FILENAME "podofo-${PODOFO_VERSION}.tar.gz"
|
||||
SHA512 35c1a457758768bdadc93632385f6b9214824fead279f1b85420443fb2135837cefca9ced476df0d47066f060e9150e12fcd40f60fa1606b177da433feb20130
|
||||
)
|
||||
|
||||
if (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
|
||||
set(ADDITIONAL_PATCH "0003-uwp_fix.patch")
|
||||
endif()
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
REF ${PODOFO_VERSION}
|
||||
PATCHES
|
||||
"unique_ptr.patch"
|
||||
"002-HAVE_UNISTD_H.patch"
|
||||
PATCHES
|
||||
0001-unique_ptr.patch
|
||||
0002-HAVE_UNISTD_H.patch
|
||||
${ADDITIONAL_PATCH}
|
||||
)
|
||||
|
||||
set(PODOFO_NO_FONTMANAGER ON)
|
||||
|
@ -15,8 +15,8 @@ index 294a50b..c7fb6bf 100644
|
||||
if(MSVC_VERSION EQUAL 1800)
|
||||
set(PROJ_COMPILER_NAME "msvc-12.0") #Visual Studio 2013
|
||||
endif()
|
||||
+ if(MSVC_VERSION EQUAL 1900)
|
||||
+ set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015
|
||||
+ if(MSVC_VERSION GREATER_EQUAL 1900)
|
||||
+ set(PROJ_COMPILER_NAME "msvc-14.0") #Visual Studio 2015/2017/2019
|
||||
+ endif()
|
||||
endif(MSVC)
|
||||
|
||||
|
@ -1,29 +1,27 @@
|
||||
include(vcpkg_common_functions)
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/proj-4.9.3)
|
||||
|
||||
set(PROJ4_VERSION 4.9.3)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://download.osgeo.org/proj/proj-4.9.3.zip"
|
||||
FILENAME "proj-4.9.3.zip"
|
||||
URLS "http://download.osgeo.org/proj/proj-${PROJ4_VERSION}.zip"
|
||||
FILENAME "proj-${PROJ4_VERSION}.zip"
|
||||
SHA512 c9703008cd1f75fe1239b180158e560b9b88ae2ffd900b72923c716908eb86d1abbc4230647af5e3131f8c34481bdc66b03826d669620161ffcfbe67801cb631
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}/
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
REF ${PROJ4_VERSION}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/0001-CMake-add-detection-of-recent-visual-studio-versions.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0002-CMake-fix-error-by-only-setting-properties-for-targe.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/0003-CMake-configurable-cmake-config-install-location.patch
|
||||
0001-CMake-add-detection-of-recent-visual-studio-versions.patch
|
||||
0002-CMake-fix-error-by-only-setting-properties-for-targe.patch
|
||||
0003-CMake-configurable-cmake-config-install-location.patch
|
||||
)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
|
||||
list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=YES")
|
||||
else()
|
||||
list(APPEND CMAKE_OPTIONS "-DBUILD_LIBPROJ_SHARED=NO")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS ${CMAKE_OPTIONS}
|
||||
OPTIONS
|
||||
-DBUILD_LIBPROJ_SHARED=${BUILD_SHARED_LIBS}
|
||||
-DPROJ_LIB_SUBDIR=lib
|
||||
-DPROJ_INCLUDE_SUBDIR=include
|
||||
-DPROJ_DATA_SUBDIR=share/proj4
|
||||
@ -36,7 +34,6 @@ vcpkg_configure_cmake(
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/proj4)
|
||||
|
||||
# Rename library and adapt cmake configuration
|
||||
@ -68,11 +65,7 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Remove duplicate headers installed from debug build
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
# Remove data installed from debug build
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/proj4)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/proj4/COPYING ${CURRENT_PACKAGES_DIR}/share/proj4/copyright)
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/proj4 RENAME copyright)
|
||||
|
13
ports/selene/disable_x86_intrinsics_on_arm.patch
Normal file
13
ports/selene/disable_x86_intrinsics_on_arm.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/selene/base/Bitcount.hpp b/selene/base/Bitcount.hpp
|
||||
index a4d69e4..709f650 100755
|
||||
--- a/selene/base/Bitcount.hpp
|
||||
+++ b/selene/base/Bitcount.hpp
|
||||
@@ -69,7 +69,7 @@ inline std::size_t bit_count(unsigned long long x)
|
||||
return static_cast<std::size_t>(__builtin_popcountll(x));
|
||||
}
|
||||
|
||||
-#elif defined(_MSC_VER)
|
||||
+#elif defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64)
|
||||
|
||||
/** \brief Performs a bit count on the supplied value.
|
||||
*
|
@ -8,6 +8,8 @@ vcpkg_from_github(
|
||||
REF v0.3.1
|
||||
SHA512 7bc57ebe9e2442da2716eb5c1af11f8d610b0b09fe96e3122d1028575732b6045a987c499bbf7de53003edd627b8809d86c80ea4975fc2264a1c61d5891a46c3
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
disable_x86_intrinsics_on_arm.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: shiva
|
||||
Version: 1.0-1
|
||||
Version: 1.0-2
|
||||
Description: Modern C++ Game Engine
|
||||
Build-Depends: boost-stacktrace, boost-filesystem, boost-dll, entt, lua (windows), luafilesystem (windows), sol2, pybind11, spdlog, nlohmann-json
|
||||
Build-Depends: boost-stacktrace, boost-filesystem, boost-dll, entt, lua, luafilesystem (windows), sol2, pybind11, spdlog, nlohmann-json
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: tesseract
|
||||
Version: 4.0.0-1
|
||||
Version: 4.0.0-2
|
||||
Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google.
|
||||
Build-Depends: leptonica, icu
|
||||
|
@ -8,14 +8,10 @@ vcpkg_from_github(
|
||||
REF 4.0.0
|
||||
SHA512 69e57d4ba1fc43d212fd0fff69a2b5d48a3b37cfee7054fdc083cbb7e04d92317609a32e457229661d70ce8d9b16c9d25e81bfc3861db660dd2c8f292202d447
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-icu.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/ws2-32.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/leptonica.patch
|
||||
use-vcpkg-icu.patch
|
||||
ws2-32.patch
|
||||
leptonica.patch
|
||||
)
|
||||
|
||||
# The built-in cmake FindICU is better
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: tiff
|
||||
Version: 4.0.10-4
|
||||
Build-Depends: zlib, libjpeg-turbo, liblzma (!uwp)
|
||||
Version: 4.0.10-6
|
||||
Build-Depends: zlib, libjpeg-turbo, liblzma
|
||||
Description: A library that supports the manipulation of TIFF image files
|
||||
|
@ -1,43 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 1ee6fd4..439e26a 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -122,6 +122,11 @@ set(EXTRA_DIST
|
||||
nmake.opt
|
||||
libtiff-4.pc.in)
|
||||
|
||||
+option(BUILD_TOOLS "Build tool executables" ON)
|
||||
+option(BUILD_DOCS "Build docs" ON)
|
||||
+option(BUILD_CONTRIB "Build contributed executables" ON)
|
||||
+option(BUILD_TESTS "Build tests" ON)
|
||||
+
|
||||
# These are annoyingly verbose, produce false positives or don't work
|
||||
# nicely with all supported compiler versions, so are disabled unless
|
||||
# explicitly enabled.
|
||||
@@ -719,12 +724,20 @@ endif()
|
||||
# Process subdirectories
|
||||
add_subdirectory(port)
|
||||
add_subdirectory(libtiff)
|
||||
-add_subdirectory(tools)
|
||||
-add_subdirectory(test)
|
||||
-add_subdirectory(contrib)
|
||||
-add_subdirectory(build)
|
||||
-add_subdirectory(man)
|
||||
-add_subdirectory(html)
|
||||
+if(BUILD_TOOLS)
|
||||
+ add_subdirectory(tools)
|
||||
+endif()
|
||||
+if(BUILD_TESTS)
|
||||
+ add_subdirectory(test)
|
||||
+endif()
|
||||
+if(BUILD_CONTRIB)
|
||||
+ add_subdirectory(contrib)
|
||||
+endif()
|
||||
+if(BUILD_DOCS)
|
||||
+ add_subdirectory(build)
|
||||
+ add_subdirectory(man)
|
||||
+ add_subdirectory(html)
|
||||
+endif()
|
||||
|
||||
#message(STATUS "EXTRA_DIST: ${EXTRA_DIST}")
|
||||
|
99
ports/tiff/cmakelists.patch
Normal file
99
ports/tiff/cmakelists.patch
Normal file
@ -0,0 +1,99 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 845ddf0..9ccb9b3 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -181,9 +181,7 @@ foreach(flag ${test_flags})
|
||||
endif (${test_c_flag})
|
||||
endforeach(flag ${test_flags})
|
||||
|
||||
-if(MSVC)
|
||||
- set(CMAKE_DEBUG_POSTFIX "d")
|
||||
-endif()
|
||||
+set(CMAKE_DEBUG_POSTFIX "d")
|
||||
|
||||
option(ld-version-script "Enable linker version script" ON)
|
||||
# Check if LD supports linker scripts.
|
||||
@@ -601,12 +599,15 @@ check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H)
|
||||
check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H)
|
||||
|
||||
# Win32 IO
|
||||
-set(win32_io FALSE)
|
||||
-if(WIN32)
|
||||
- set(win32_io TRUE)
|
||||
+set(USE_WIN32_FILEIO FALSE CACHE BOOL "")
|
||||
+if(MSVC)
|
||||
+ if (NOT CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") #on UWP we use the unix I/O api
|
||||
+ set(USE_WIN32_FILEIO TRUE CACHE BOOL "" FORCE)
|
||||
+ add_definitions(-DUSE_WIN32_FILEIO)
|
||||
+ endif()
|
||||
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS /wd4996)
|
||||
endif()
|
||||
|
||||
-set(USE_WIN32_FILEIO ${win32_io})
|
||||
|
||||
# Orthogonal features
|
||||
|
||||
@@ -708,16 +709,28 @@ endif()
|
||||
|
||||
#report_values(TIFF_INCLUDES TIFF_LIBRARY_DEPS)
|
||||
|
||||
+option(BUILD_TOOLS "Build tool executables" ON)
|
||||
+option(BUILD_DOCS "Build docs" ON)
|
||||
+option(BUILD_CONTRIB "Build contributed executables" ON)
|
||||
+option(BUILD_TESTS "Build tests" ON)
|
||||
+
|
||||
# Process subdirectories
|
||||
add_subdirectory(port)
|
||||
add_subdirectory(libtiff)
|
||||
-add_subdirectory(tools)
|
||||
-add_subdirectory(test)
|
||||
-add_subdirectory(contrib)
|
||||
-add_subdirectory(build)
|
||||
-add_subdirectory(man)
|
||||
-add_subdirectory(html)
|
||||
-
|
||||
+if(BUILD_TOOLS)
|
||||
+ add_subdirectory(tools)
|
||||
+endif()
|
||||
+if(BUILD_TESTS)
|
||||
+ add_subdirectory(test)
|
||||
+endif()
|
||||
+if(BUILD_CONTRIB)
|
||||
+ add_subdirectory(contrib)
|
||||
+endif()
|
||||
+if(BUILD_DOCS)
|
||||
+ add_subdirectory(build)
|
||||
+ add_subdirectory(man)
|
||||
+ add_subdirectory(html)
|
||||
+endif()
|
||||
#message(STATUS "EXTRA_DIST: ${EXTRA_DIST}")
|
||||
|
||||
message(STATUS "")
|
||||
diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt
|
||||
index 1cf1b75..4ee29f6 100644
|
||||
--- a/libtiff/CMakeLists.txt
|
||||
+++ b/libtiff/CMakeLists.txt
|
||||
@@ -104,11 +104,11 @@ set(tiffxx_HEADERS
|
||||
set(tiffxx_SOURCES
|
||||
tif_stream.cxx)
|
||||
|
||||
-if(WIN32_IO)
|
||||
- extra_dist(tif_unix.c)
|
||||
+if(USE_WIN32_FILEIO)
|
||||
+ extra_dist(tif_win32.c)
|
||||
list(APPEND tiff_SOURCES tif_win32.c)
|
||||
else()
|
||||
- extra_dist(tif_win32.c)
|
||||
+ extra_dist(tif_unix.c)
|
||||
list(APPEND tiff_SOURCES tif_unix.c)
|
||||
endif()
|
||||
|
||||
@@ -143,7 +143,7 @@ install(FILES ${tiff_HEADERS} ${nodist_tiff_HEADERS}
|
||||
DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
|
||||
|
||||
if(CXX_SUPPORT)
|
||||
- add_library(tiffxx ${tiffxx_SOURCES} ${tiffxx_HEADERS})
|
||||
+ add_library(tiffxx STATIC ${tiffxx_SOURCES} ${tiffxx_HEADERS})
|
||||
target_link_libraries(tiffxx tiff)
|
||||
set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION})
|
||||
if(NOT CYGWIN)
|
@ -1,12 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 439e26a..05416d8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -187,6 +187,7 @@ endforeach(flag ${test_flags})
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_DEBUG_POSTFIX "d")
|
||||
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS /wd4996)
|
||||
endif()
|
||||
|
||||
option(ld-version-script "Enable linker version script" ON)
|
@ -1,23 +0,0 @@
|
||||
From 4370dea04189fb9d9a94e1f4ee96ef2d24937fc9 Mon Sep 17 00:00:00 2001
|
||||
From: Mikhail Paulyshka <me@mixaill.tk>
|
||||
Date: Thu, 23 Mar 2017 17:55:14 +0300
|
||||
Subject: [PATCH] fix shared libs building
|
||||
|
||||
---
|
||||
libtiff/CMakeLists.txt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt
|
||||
index 087dfa9..20fa8b4 100644
|
||||
--- a/libtiff/CMakeLists.txt
|
||||
+++ b/libtiff/CMakeLists.txt
|
||||
@@ -142,6 +142,7 @@ if(cxx)
|
||||
add_library(tiffxx ${tiffxx_SOURCES} ${tiffxx_HEADERS})
|
||||
target_link_libraries(tiffxx tiff)
|
||||
set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION})
|
||||
+ set_target_properties(tiffxx PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
if(NOT CYGWIN)
|
||||
# This property causes shared libraries on Linux to have the full version
|
||||
# encoded into their final filename. We disable this on Cygwin because
|
||||
--
|
||||
2.11.0.windows.1
|
@ -2,22 +2,19 @@ include(vcpkg_common_functions)
|
||||
|
||||
set(LIBTIFF_VERSION 4.0.10)
|
||||
|
||||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://download.osgeo.org/libtiff/tiff-${LIBTIFF_VERSION}.tar.gz"
|
||||
FILENAME "tiff-${LIBTIFF_VERSION}.tar.gz"
|
||||
SHA512 d213e5db09fd56b8977b187c5a756f60d6e3e998be172550c2892dbdb4b2a8e8c750202bc863fe27d0d1c577ab9de1710d15e9f6ed665aadbfd857525a81eea8
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE ${ARCHIVE}
|
||||
REF ${LIBTIFF_VERSION}
|
||||
PATCHES
|
||||
add-component-options.patch
|
||||
fix-cxx-shared-libs.patch
|
||||
crt-secure-no-deprecate.patch
|
||||
fix-stddef.patch
|
||||
cmakelists.patch
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
|
||||
@ -46,19 +43,9 @@ file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/debug/share
|
||||
${CURRENT_PACKAGES_DIR}/share
|
||||
)
|
||||
file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/tiff)
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake
|
||||
${CURRENT_PACKAGES_DIR}/share/tiff
|
||||
@ONLY
|
||||
)
|
||||
file(INSTALL
|
||||
${SOURCE_PATH}/COPYRIGHT
|
||||
DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff
|
||||
RENAME copyright
|
||||
)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff)
|
||||
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff)
|
||||
file(INSTALL ${SOURCE_PATH}/COPYRIGHT DESTINATION ${CURRENT_PACKAGES_DIR}/share/tiff RENAME copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_test_cmake(PACKAGE_NAME TIFF MODULE)
|
||||
|
@ -1,4 +0,0 @@
|
||||
The package tiff is compatible with built-in CMake targets:
|
||||
|
||||
find_package(TIFF REQUIRED)
|
||||
target_link_libraries(main PRIVATE TIFF::TIFF)
|
@ -1,17 +1,23 @@
|
||||
_find_package(${ARGS})
|
||||
|
||||
find_package(LibLZMA)
|
||||
find_package(LibLZMA CONFIG)
|
||||
find_package(JPEG)
|
||||
find_package(ZLIB)
|
||||
if(TARGET TIFF::TIFF)
|
||||
set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${LIBLZMA_LIBRARIES} JPEG::JPEG ZLIB::ZLIB)
|
||||
set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES LibLZMA::LibLZMA JPEG::JPEG ZLIB::ZLIB)
|
||||
if(UNIX)
|
||||
set_property(TARGET TIFF::TIFF APPEND PROPERTY INTERFACE_LINK_LIBRARIES m)
|
||||
endif()
|
||||
endif()
|
||||
if(TIFF_LIBRARIES)
|
||||
list(APPEND TIFF_LIBRARIES ${LIBLZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
list(APPEND TIFF_LIBRARIES ${LZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
if(UNIX)
|
||||
list(APPEND TIFF_LIBRARIES m)
|
||||
endif()
|
||||
endif()
|
||||
if(TIFF_LIBRARY)
|
||||
list(APPEND TIFF_LIBRARY ${LZMA_LIBRARIES} ${JPEG_LIBRARIES} ${ZLIB_LIBRARIES})
|
||||
if(UNIX)
|
||||
list(APPEND TIFF_LIBRARY m)
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user