File 0001-Fix-LZ4_LDFLAGS-format-for-pkgconfig-file.patch of Package flann

From 39aa2405f59f7c058d88e692f2bbebf06dc59004 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
Date: Thu, 6 Oct 2022 18:07:07 +0200
Subject: [PATCH] Fix LZ4_LDFLAGS format for pkgconfig file

CMake pkg_check_module puts all linker flags from pkgcconfig in a
semicolon separated list, which must be converted to space separated
before substituting the variable in flann's pkgconfig file.
---
 cmake/CMakeLists.txt | 1 +
 cmake/flann.pc.in    | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index fb70f4c..c7413df 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -1,5 +1,6 @@
 set(PKG_DESC "Fast Library for Approximate Nearest Neighbors")
 set(pkg_conf_file ${CMAKE_CURRENT_BINARY_DIR}/flann.pc)
+string(JOIN " " PKG_LZ4_libs ${LZ4_LDFLAGS})
 configure_file(flann.pc.in ${pkg_conf_file} @ONLY)
 install(FILES ${pkg_conf_file}
     DESTINATION ${FLANN_LIB_INSTALL_DIR}/pkgconfig/ COMPONENT pkgconfig)
diff --git a/cmake/flann.pc.in b/cmake/flann.pc.in
index 07b8d64..8ee2036 100644
--- a/cmake/flann.pc.in
+++ b/cmake/flann.pc.in
@@ -8,6 +8,6 @@ Name: @PROJECT_NAME@
 Description: @PKG_DESC@
 Version: @FLANN_VERSION@
 Requires: @PKG_EXTERNAL_DEPS@
-Libs: -L${libdir} @LZ4_STATIC_LDFLAGS@ -lflann -lflann_cpp
+Libs: -L${libdir} @PKG_LZ4_libs@ -lflann -lflann_cpp
 Cflags: -I${includedir}
 
-- 
2.37.3

openSUSE Build Service is sponsored by