aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/pdal-c
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/pdal-c')
-rw-r--r--vcpkg/ports/pdal-c/cmake-project-include.cmake3
-rw-r--r--vcpkg/ports/pdal-c/portfile.cmake28
-rw-r--r--vcpkg/ports/pdal-c/vcpkg.json17
3 files changed, 48 insertions, 0 deletions
diff --git a/vcpkg/ports/pdal-c/cmake-project-include.cmake b/vcpkg/ports/pdal-c/cmake-project-include.cmake
new file mode 100644
index 0000000..39f3cca
--- /dev/null
+++ b/vcpkg/ports/pdal-c/cmake-project-include.cmake
@@ -0,0 +1,3 @@
+if(WIN32)
+ add_compile_definitions(NOMINMAX)
+endif()
diff --git a/vcpkg/ports/pdal-c/portfile.cmake b/vcpkg/ports/pdal-c/portfile.cmake
new file mode 100644
index 0000000..559361d
--- /dev/null
+++ b/vcpkg/ports/pdal-c/portfile.cmake
@@ -0,0 +1,28 @@
+vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO PDAL/CAPI
+ REF "v${VERSION}"
+ SHA512 6fe2136831e37c2f87643b3c971a1397d8912c230e9bfde53a51ec1769bc5c2f08482395263906975c5d40dbabd32852a5a145a159cdcf2548390a0aff72a295
+ HEAD_REF master
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ "-DCMAKE_PROJECT_INCLUDE=${CMAKE_CURRENT_LIST_DIR}/cmake-project-include.cmake"
+ -DPDALC_ENABLE_CODE_COVERAGE:BOOL=OFF
+ -DPDALC_ENABLE_DOCS:BOOL=OFF
+ -DPDALC_ENABLE_TESTS:BOOL=OFF
+ -DCMAKE_DISABLE_FIND_PACKAGE_Git:BOOL=ON
+)
+
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+
+# Remove headers from debug
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+# Install copyright
+file(INSTALL "${SOURCE_PATH}/LICENSE.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/pdal-c/vcpkg.json b/vcpkg/ports/pdal-c/vcpkg.json
new file mode 100644
index 0000000..8626a50
--- /dev/null
+++ b/vcpkg/ports/pdal-c/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "pdal-c",
+ "version": "2.2.0",
+ "description": "C API for the Point Data Abstraction Library (PDAL)",
+ "homepage": "https://github.com/PDAL/CAPI#readme",
+ "supports": "!(windows & staticcrt)",
+ "dependencies": [
+ {
+ "name": "pdal",
+ "default-features": false
+ },
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ }
+ ]
+}