aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/popsift
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/popsift')
-rw-r--r--vcpkg/ports/popsift/portfile.cmake43
-rw-r--r--vcpkg/ports/popsift/vcpkg.json31
2 files changed, 74 insertions, 0 deletions
diff --git a/vcpkg/ports/popsift/portfile.cmake b/vcpkg/ports/popsift/portfile.cmake
new file mode 100644
index 0000000..5cd577b
--- /dev/null
+++ b/vcpkg/ports/popsift/portfile.cmake
@@ -0,0 +1,43 @@
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO alicevision/popsift
+ REF v${VERSION}
+ SHA512 374a00542ff46ac8a8cf31b7a62c834e4e148c5f9ddd5f6a128e4284e637242c0ce55bf3ee6524e6555c8402332ec8863ca921cef36c0bacd9a1ada6c8e09b55
+ HEAD_REF develop
+)
+
+vcpkg_find_cuda(OUT_CUDA_TOOLKIT_ROOT CUDA_TOOLKIT_ROOT)
+
+# This is necessary as popsift uses cuda as first class language in CMake and
+# depending on the version of CMake it might fail to find nvcc compiler.
+if(CMAKE_HOST_WIN32)
+ set(NVCC_PATH ${CUDA_TOOLKIT_ROOT}/bin/nvcc.exe)
+else()
+ set(NVCC_PATH ${CUDA_TOOLKIT_ROOT}/bin/nvcc)
+endif()
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ FEATURES
+ apps PopSift_BUILD_EXAMPLES
+)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS ${FEATURE_OPTIONS}
+ "-DCMAKE_CUDA_COMPILER=${NVCC_PATH}"
+)
+
+vcpkg_cmake_install()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/PopSift)
+
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
+
+# copy the apps in tools directory
+if ("apps" IN_LIST FEATURES)
+ vcpkg_copy_tools(TOOL_NAMES popsift-demo AUTO_CLEAN)
+endif()
+
+file(INSTALL "${SOURCE_PATH}/COPYING.md" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/popsift/vcpkg.json b/vcpkg/ports/popsift/vcpkg.json
new file mode 100644
index 0000000..ff4af93
--- /dev/null
+++ b/vcpkg/ports/popsift/vcpkg.json
@@ -0,0 +1,31 @@
+{
+ "name": "popsift",
+ "version": "0.10.0",
+ "description": "PopSift is an implementation of the SIFT algorithm in CUDA.",
+ "homepage": "https://github.com/alicevision/popsift",
+ "documentation": "https://popsift.readthedocs.io/",
+ "license": "MPL-2.0",
+ "supports": "!(uwp | arm | arm64 | android | x86)",
+ "dependencies": [
+ "cuda",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ],
+ "features": {
+ "apps": {
+ "description": "Application programs for popsift (detection and matching)",
+ "dependencies": [
+ "boost-algorithm",
+ "boost-filesystem",
+ "boost-program-options",
+ "boost-system"
+ ]
+ }
+ }
+}