summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch
blob: 5053caae33fa270960b9b115f132239935a0f23e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From ca4655f36c3c7883eb50381902890b23f0e8aaab Mon Sep 17 00:00:00 2001
From: Alexander Kanavin <alex@linutronix.de>
Date: Wed, 29 Nov 2023 14:06:15 +0100
Subject: [PATCH] CMakeLists.txt: look for lua with pkg-config rather than
 cmake modules

Otherwise cmake will try to find libm, badly, and fail.

Upstream-Status: Inappropriate [oe-core specific]
Signed-off-by: Alexander Kanavin <alex@linutronix.de>

---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f0630453..d0ea565f3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -187,7 +187,7 @@ set(REQFUNCS
 )
 
 find_package(PkgConfig REQUIRED)
-find_package(Lua 5.2 REQUIRED)
+pkg_check_modules(LUA REQUIRED IMPORTED_TARGET lua>=5.2)
 find_package(ZLIB REQUIRED)
 find_package(BZip2)
 find_package(Iconv)