diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/small-gicp | |
Diffstat (limited to 'vcpkg/ports/small-gicp')
| -rw-r--r-- | vcpkg/ports/small-gicp/portfile.cmake | 31 | ||||
| -rw-r--r-- | vcpkg/ports/small-gicp/preprocessor_portability.patch | 13 | ||||
| -rw-r--r-- | vcpkg/ports/small-gicp/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/small-gicp/vcpkg.json | 36 |
4 files changed, 84 insertions, 0 deletions
diff --git a/vcpkg/ports/small-gicp/portfile.cmake b/vcpkg/ports/small-gicp/portfile.cmake new file mode 100644 index 0000000..ccb445c --- /dev/null +++ b/vcpkg/ports/small-gicp/portfile.cmake @@ -0,0 +1,31 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO koide3/small_gicp + REF "v${VERSION}" + SHA512 b4d4b662d74b5492b7b89bcaf022e2d90262eecd3f1b6d3229edefbb00288a95910d486e66a9e884528f6f9c253a5e535ce7f96829fdc760f58ac001f6192790 + HEAD_REF master + PATCHES preprocessor_portability.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + pcl BUILD_WITH_PCL + tbb BUILD_WITH_TBB + openmp BUILD_WITH_OPENMP +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + ${FEATURE_OPTIONS} +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup( + PACKAGE_NAME small_gicp + CONFIG_PATH lib/cmake/small_gicp +) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/vcpkg/ports/small-gicp/preprocessor_portability.patch b/vcpkg/ports/small-gicp/preprocessor_portability.patch new file mode 100644 index 0000000..368f06a --- /dev/null +++ b/vcpkg/ports/small-gicp/preprocessor_portability.patch @@ -0,0 +1,13 @@ +diff --git a/include/small_gicp/registration/reduction_omp.hpp b/include/small_gicp/registration/reduction_omp.hpp +index 8c11267..7edf4a5 100644 +--- a/include/small_gicp/registration/reduction_omp.hpp ++++ b/include/small_gicp/registration/reduction_omp.hpp +@@ -7,7 +7,7 @@ + namespace small_gicp { + + #ifndef _OPENMP +-#warning "OpenMP is not available. Parallel reduction will be disabled." ++#pragma message ( "OpenMP is not available. Parallel reduction will be disabled." ) + inline int omp_get_thread_num() { + return 0; + } diff --git a/vcpkg/ports/small-gicp/usage b/vcpkg/ports/small-gicp/usage new file mode 100644 index 0000000..74f8c51 --- /dev/null +++ b/vcpkg/ports/small-gicp/usage @@ -0,0 +1,4 @@ +small-gicp provides CMake targets: + + find_package(small_gicp REQUIRED) + target_link_libraries(main PRIVATE small_gicp::small_gicp) diff --git a/vcpkg/ports/small-gicp/vcpkg.json b/vcpkg/ports/small-gicp/vcpkg.json new file mode 100644 index 0000000..c120a20 --- /dev/null +++ b/vcpkg/ports/small-gicp/vcpkg.json @@ -0,0 +1,36 @@ +{ + "name": "small-gicp", + "version": "1.0.0", + "description": "Efficient and parallelized algorithms for point cloud registration", + "homepage": "https://github.com/koide3/small_gicp", + "license": "MIT", + "supports": "!(x86 | arm32)", + "dependencies": [ + "eigen3", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "openmp": { + "description": "Enable OpenMP based parallelism." + }, + "pcl": { + "description": "Enable interfacing with PointCloud Library.", + "dependencies": [ + "pcl" + ] + }, + "tbb": { + "description": "Enable Intel TBB based parallelism.", + "dependencies": [ + "tbb" + ] + } + } +} |