mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 09:41:39 +08:00
[flann] Fix missing hdf5 dependency in flann-config.cmake (#22153)
* add find_package hdf5 in flann-config.cmake * update versions * Update flann.json Co-authored-by: Lily Wang <v-lilywang@microsoft.com>
This commit is contained in:
parent
9e50a7c8c3
commit
bc4b12f517
@ -28,7 +28,7 @@ index f4b94d2..33b2c26 100644
|
||||
option(BUILD_C_BINDINGS "Build C bindings" ON)
|
||||
option(BUILD_PYTHON_BINDINGS "Build Python bindings" ON)
|
||||
option(BUILD_MATLAB_BINDINGS "Build Matlab bindings" ON)
|
||||
@@ -146,8 +148,8 @@ if (BUILD_CUDA_LIB)
|
||||
@@ -146,8 +148,9 @@ if (BUILD_CUDA_LIB)
|
||||
endif(CUDA_FOUND)
|
||||
endif(BUILD_CUDA_LIB)
|
||||
|
||||
@ -36,6 +36,7 @@ index f4b94d2..33b2c26 100644
|
||||
-pkg_check_modules(LZ4 REQUIRED liblz4)
|
||||
+find_package(PkgConfig)
|
||||
+find_package(lz4 CONFIG REQUIRED)
|
||||
+set(PKG_EXTERNAL_DEPS "${PKG_EXTERNAL_DEPS} liblz4")
|
||||
|
||||
#set the C/C++ include path to the "include" directory
|
||||
include_directories(BEFORE ${PROJECT_SOURCE_DIR}/src/cpp)
|
||||
|
@ -2,7 +2,7 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 7ff331a..155cabe 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -75,11 +75,17 @@ if (NOT PYTHON_EXECUTABLE)
|
||||
@@ -75,11 +75,18 @@ if (NOT PYTHON_EXECUTABLE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -19,6 +19,7 @@ index 7ff331a..155cabe 100644
|
||||
+ elseif (TARGET hdf5::hdf5-static)
|
||||
+ link_libraries(hdf5::hdf5-static)
|
||||
+ endif()
|
||||
+ set(PKG_EXTERNAL_DEPS "${PKG_EXTERNAL_DEPS} hdf5")
|
||||
+endif()
|
||||
endif()
|
||||
|
||||
@ -51,3 +52,16 @@ index 8aef8e0..747414f 100644
|
||||
mark_as_advanced( HDF5_IS_PARALLEL )
|
||||
endmacro(find_hdf5)
|
||||
|
||||
|
||||
diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in
|
||||
index e8bb3f766..ad33998d9 100644
|
||||
--- a/cmake/Config.cmake.in
|
||||
+++ b/cmake/Config.cmake.in
|
||||
@@ -4,6 +4,7 @@
|
||||
include(CMakeFindDependencyMacro)
|
||||
# Find lz4. This will create 'lz4::lz4' target
|
||||
find_dependency(lz4)
|
||||
+find_package(hdf5 REQUIRED)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
|
||||
check_required_components("flann")
|
||||
|
@ -20,9 +20,8 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" FLANN_BUILD_STATIC)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" FLANN_BUILD_DYNAMIC)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
OPTIONS ${FEATURE_OPTIONS}
|
||||
-DBUILD_DYNAMIC=${FLANN_BUILD_DYNAMIC}
|
||||
@ -37,8 +36,8 @@ vcpkg_configure_cmake(
|
||||
-DHDF5_NO_FIND_PACKAGE_CONFIG_FILE=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
|
@ -1,11 +1,19 @@
|
||||
{
|
||||
"name": "flann",
|
||||
"version-date": "2019-04-07",
|
||||
"port-version": 3,
|
||||
"port-version": 4,
|
||||
"description": "Fast Library for Approximate Nearest Neighbors",
|
||||
"homepage": "https://github.com/mariusmuja/flann",
|
||||
"dependencies": [
|
||||
"lz4"
|
||||
"lz4",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
],
|
||||
"features": {
|
||||
"cuda": {
|
||||
|
@ -2174,7 +2174,7 @@
|
||||
},
|
||||
"flann": {
|
||||
"baseline": "2019-04-07",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"flash-runtime-extensions": {
|
||||
"baseline": "2.4",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "9ceb0dabb980c9cdfb5d9cf1a23e66ec90e75285",
|
||||
"version-date": "2019-04-07",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "7677f18c73aa0d5216af138b2fba9bcea56e3f1b",
|
||||
"version-date": "2019-04-07",
|
||||
|
Loading…
Reference in New Issue
Block a user