baresip/baresip-3.8.0-cmake-findre.patch

46 lines
1.3 KiB
Diff

From 04efa525e7909196fe4b410150267935e36150c7 Mon Sep 17 00:00:00 2001
From: Robert Scheck <robert@fedoraproject.org>
Date: Fri, 2 Feb 2024 00:41:37 +0100
Subject: [PATCH] cmake: add /usr/{local,}/include/re and
/usr/{local,}/lib{64,} to FindRE.cmake (fixes #2899)
---
cmake/FindRE.cmake | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/cmake/FindRE.cmake b/cmake/FindRE.cmake
index 2e36c90a4..4272fff36 100644
--- a/cmake/FindRE.cmake
+++ b/cmake/FindRE.cmake
@@ -1,12 +1,25 @@
find_package(PkgConfig QUIET)
pkg_check_modules(PC_LIBRE QUIET libre)
-find_path(RE_INCLUDE_DIR re.h
- HINTS ../re/include ${PC_LIBRE_INCLUDEDIR} ${PC_LIBRE_INCLUDE_DIRS})
+find_path(RE_INCLUDE_DIR
+ NAME re.h
+ HINTS
+ ../re/include
+ ${PC_LIBRE_INCLUDEDIR}
+ ${PC_LIBRE_INCLUDE_DIRS}
+ PATHS /usr/local/include/re /usr/include/re
+)
-find_library(RE_LIBRARY NAMES re libre re-static
- HINTS ../re ../re/build ../re/build/Debug
- ${PC_LIBRE_LIBDIR} ${PC_LIBRE_LIBRARY_DIRS})
+find_library(RE_LIBRARY
+ NAMES re libre re-static
+ HINTS
+ ../re
+ ../re/build
+ ../re/build/Debug
+ ${PC_LIBRE_LIBDIR}
+ ${PC_LIBRE_LIBRARY_DIRS}
+ PATHS /usr/local/lib64 /usr/lib64 /usr/local/lib /usr/lib
+)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(RE DEFAULT_MSG RE_LIBRARY RE_INCLUDE_DIR)