Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pdal] delete and replace different find modules #6603

Merged
merged 6 commits into from
Jun 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions ports/pdal/FindGDAL.cmake

This file was deleted.

13 changes: 13 additions & 0 deletions ports/pdal/PDALConfig.patch
Original file line number Diff line number Diff line change
@@ -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)
16 changes: 12 additions & 4 deletions ports/pdal/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down