summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/files/0001-CMakeLists.txt-look-for-lua-with-pkg-config-rather-t.patch
blob: e4edc884b1e181cb85da011e007b9e16375bf89b (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
From c39a074ff3c4d21c100d387661c7d725b5eae7b0 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 4a383ceba..ed847c09a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -190,7 +190,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)