Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
graphics
openMVG
flann_prefer_cmake_config.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File flann_prefer_cmake_config.patch of Package openMVG
From a462f9f7fd643399f414a236fc14be4eb46fd637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de> Date: Thu, 19 Jan 2023 04:34:30 +0100 Subject: [PATCH] Prefer CMake Config when looking for Flann Latest flann may link to e.g. liblz4, and the FindFlann module does not handle transitive lib dependencies. In case external flann is required try the upstream CMake Config first, and fall back to the legacy lookup. Fixes #1265. --- src/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bb9b2eca5..af920fc68 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -322,8 +322,15 @@ endif() if (NOT DEFINED FLANN_INCLUDE_DIR_HINTS) set(FLANN_INCLUDE_DIR_HINTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp) set(OpenMVG_USE_INTERNAL_FLANN ON) + find_package(Flann QUIET) +else() + find_package(Flann QUIET CONFIG) + if (TARGET flann::flann) + set(FLANN_LIBRARIES "flann::flann;flann::flann_cpp") + else() + find_package(Flann QUIET) + endif() endif() -find_package(Flann QUIET) if (NOT FLANN_FOUND OR OpenMVG_USE_INTERNAL_FLANN) set(FLANN_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/flann/src/cpp) endif()
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor