diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2019-06-03 22:31:35 +0200 |
|---|---|---|
| committer | Victor Romero <romerosanchezv@gmail.com> | 2019-06-03 13:31:35 -0700 |
| commit | 35c8538e2cae64d79ec48c2c16b9bf97365ec21d (patch) | |
| tree | 4b405b49e21a648ca425238c0ecc8d4319248a10 | |
| parent | 785dd6d0ebc6f3ba5d25e2f5d31aededf95a2bbe (diff) | |
| download | vcpkg-35c8538e2cae64d79ec48c2c16b9bf97365ec21d.tar.gz vcpkg-35c8538e2cae64d79ec48c2c16b9bf97365ec21d.zip | |
[pdal] delete and replace different find modules (#6603)
* [pdal] delete and replace different find modules
* [pdal] add geotiff as a dependency to the config of pdal
* remove version
| -rw-r--r-- | ports/pdal/FindGDAL.cmake | 13 | ||||
| -rw-r--r-- | ports/pdal/PDALConfig.patch | 13 | ||||
| -rw-r--r-- | ports/pdal/portfile.cmake | 16 |
3 files changed, 25 insertions, 17 deletions
diff --git a/ports/pdal/FindGDAL.cmake b/ports/pdal/FindGDAL.cmake deleted file mode 100644 index 9683cb0e5..000000000 --- a/ports/pdal/FindGDAL.cmake +++ /dev/null @@ -1,13 +0,0 @@ -find_path(GDAL_INCLUDE_DIR gdal.h)
-
-find_library(GDAL_LIBRARY_DEBUG NAMES gdald)
-find_library(GDAL_LIBRARY_RELEASE NAMES gdal)
-
-include(SelectLibraryConfigurations)
-select_library_configurations(GDAL)
-
-include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(
- GDAL DEFAULT_MSG
- GDAL_LIBRARY GDAL_INCLUDE_DIR
-)
diff --git a/ports/pdal/PDALConfig.patch b/ports/pdal/PDALConfig.patch new file mode 100644 index 000000000..ea7681dc1 --- /dev/null +++ b/ports/pdal/PDALConfig.patch @@ -0,0 +1,13 @@ +diff --git a/PDALConfig.cmake.in b/PDALConfig.cmake.in +index a03ef142e..2d06a2937 100644 +--- a/PDALConfig.cmake.in ++++ b/PDALConfig.cmake.in +@@ -15,6 +15,8 @@ foreach(_dir @PDAL_CONFIG_LIBRARY_DIRS@) + list(APPEND PDAL_LIBRARY_DIRS ${_foo}) + endforeach(_dir) + ++include(CMakeFindDependencyMacro) ++find_dependency(GeoTIFF) + include("${CMAKE_CURRENT_LIST_DIR}/PDALTargets.cmake") + + if (WIN32) diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake index 2ceaf99ab..566fc08e4 100644 --- a/ports/pdal/portfile.cmake +++ b/ports/pdal/portfile.cmake @@ -18,13 +18,21 @@ vcpkg_extract_source_archive_ex( 0001-win32_compiler_options.cmake.patch 0002-no-source-dir-writes.patch 0003-fix-copy-vendor.patch + PDALConfig.patch ) file(REMOVE "${SOURCE_PATH}/pdal/gitsha.cpp") -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/) + +# Deploy custom CMake modules to enforce expected dependencies look-up +foreach(_module IN ITEMS FindGDAL FindGEOS FindGeoTIFF FindCurl) # Outdated; Supplied by CMake + file(REMOVE "${SOURCE_PATH}/cmake/modules/${_module}.cmake") +endforeach() +foreach(_module IN ITEMS FindGEOS) # Overwritten Modules. + file(REMOVE "${SOURCE_PATH}/cmake/modules/${_module}.cmake") + file(COPY ${CMAKE_CURRENT_LIST_DIR}/${_module}.cmake + DESTINATION ${SOURCE_PATH}/cmake/modules/ + ) +endforeach() # 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 |
