From 9b2922b45795d15c604f78f1752c22a41e85f177 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Fri, 24 May 2019 18:18:35 +0200 Subject: [PATCH 1/3] [pdal] delete and replace different find modules --- ports/pdal/FindGDAL.cmake | 13 ------------- ports/pdal/FindGeoTIFF.cmake | 13 ------------- ports/pdal/portfile.cmake | 6 ++++-- 3 files changed, 4 insertions(+), 28 deletions(-) delete mode 100644 ports/pdal/FindGDAL.cmake delete mode 100644 ports/pdal/FindGeoTIFF.cmake diff --git a/ports/pdal/FindGDAL.cmake b/ports/pdal/FindGDAL.cmake deleted file mode 100644 index 9683cb0e5209f6..00000000000000 --- 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/FindGeoTIFF.cmake b/ports/pdal/FindGeoTIFF.cmake deleted file mode 100644 index 51a5fb2d8df5c8..00000000000000 --- a/ports/pdal/FindGeoTIFF.cmake +++ /dev/null @@ -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 -) diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake index 6ab78024faa485..fe8eae8805c1f3 100644 --- a/ports/pdal/portfile.cmake +++ b/ports/pdal/portfile.cmake @@ -23,13 +23,15 @@ 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) +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 if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") From f5c0b4bfc87fcb0f809e479ddfa5aab08e385b1b Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 26 May 2019 14:10:23 +0200 Subject: [PATCH 2/3] [pdal] add geotiff as a dependency to the config of pdal --- ports/pdal/PDALConfig.patch | 13 +++++++++++++ ports/pdal/portfile.cmake | 1 + 2 files changed, 14 insertions(+) create mode 100644 ports/pdal/PDALConfig.patch diff --git a/ports/pdal/PDALConfig.patch b/ports/pdal/PDALConfig.patch new file mode 100644 index 00000000000000..144478a4f426c8 --- /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 1.3.0) + include("${CMAKE_CURRENT_LIST_DIR}/PDALTargets.cmake") + + if (WIN32) diff --git a/ports/pdal/portfile.cmake b/ports/pdal/portfile.cmake index fe8eae8805c1f3..4fcb7fe4645ee9 100644 --- a/ports/pdal/portfile.cmake +++ b/ports/pdal/portfile.cmake @@ -18,6 +18,7 @@ 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") From cdedfee40d7b19e9668b3ad0d8c280f8cdd37f62 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 3 Jun 2019 11:33:56 +0200 Subject: [PATCH 3/3] remove version --- ports/pdal/PDALConfig.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/pdal/PDALConfig.patch b/ports/pdal/PDALConfig.patch index 144478a4f426c8..ea7681dc10175d 100644 --- a/ports/pdal/PDALConfig.patch +++ b/ports/pdal/PDALConfig.patch @@ -7,7 +7,7 @@ index a03ef142e..2d06a2937 100644 endforeach(_dir) +include(CMakeFindDependencyMacro) -+find_dependency(GeoTIFF 1.3.0) ++find_dependency(GeoTIFF) include("${CMAKE_CURRENT_LIST_DIR}/PDALTargets.cmake") if (WIN32)