aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/nanoflann
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/nanoflann')
-rw-r--r--vcpkg/ports/nanoflann/portfile.cmake30
-rw-r--r--vcpkg/ports/nanoflann/vcpkg.json17
2 files changed, 47 insertions, 0 deletions
diff --git a/vcpkg/ports/nanoflann/portfile.cmake b/vcpkg/ports/nanoflann/portfile.cmake
new file mode 100644
index 0000000..4b5a9a6
--- /dev/null
+++ b/vcpkg/ports/nanoflann/portfile.cmake
@@ -0,0 +1,30 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO jlblancoc/nanoflann
+ REF "v${VERSION}"
+ SHA512 258b2145f2972f6e6cbfa524dfada15f6d66fd53ab81cd55924f159c6c05eb55c56426039bded0357ea707c34df3ca04fa4875a42baeecb5e6b5f4a57feac808
+ HEAD_REF master
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ -DNANOFLANN_BUILD_EXAMPLES=OFF
+ -DNANOFLANN_BUILD_TESTS=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH "share/cmake/${PORT}")
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+file(READ "${CURRENT_PACKAGES_DIR}/share/nanoflann/nanoflannConfig.cmake" _contents)
+file(WRITE "${CURRENT_PACKAGES_DIR}/share/nanoflann/nanoflannConfig.cmake" "
+include(CMakeFindDependencyMacro)
+find_dependency(Threads)
+${_contents}")
+
+# Handle copyright
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
+
diff --git a/vcpkg/ports/nanoflann/vcpkg.json b/vcpkg/ports/nanoflann/vcpkg.json
new file mode 100644
index 0000000..aee1870
--- /dev/null
+++ b/vcpkg/ports/nanoflann/vcpkg.json
@@ -0,0 +1,17 @@
+{
+ "name": "nanoflann",
+ "version": "1.7.1",
+ "description": "nanoflann is a C++11 header-only library for building KD-Trees of datasets with different topologies: R2, R3 (point clouds), SO(2) and SO(3) (2D and 3D rotation groups).",
+ "homepage": "https://github.com/jlblancoc/nanoflann",
+ "license": "BSD-3-Clause",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}