vcpkg/ports/libgeotiff/cmakelists.patch
Stefano Sinigardi a9303736fd [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
2019-05-28 16:58:00 -07:00

125 lines
4.5 KiB
Diff

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")