| 1 | Patch-Source: https://github.com/organicmaps/organicmaps/pull/7982
|
| 2 | ---
|
| 3 | From 905b161487865a200ce4a43fb2c1d96ecb38e102 Mon Sep 17 00:00:00 2001
|
| 4 | From: Gerion Entrup <[email protected]>
|
| 5 | Date: Thu, 25 Apr 2024 10:14:41 +0200
|
| 6 | Subject: [PATCH] CMakeLists: import jansson with pkgconfig
|
| 7 |
|
| 8 | Upstream jansson offers compiling with autotools and CMake.
|
| 9 | If it is compiled with autotools (the recommended way) it does only
|
| 10 | provide a pkgconfig file and not a cmake file.
|
| 11 | This is also the way most distributions provide jansson, so this commit
|
| 12 | changes the behavior to use pkgconfig, too.
|
| 13 |
|
| 14 | Signed-off-by: Gerion Entrup <[email protected]>
|
| 15 | ---
|
| 16 | CMakeLists.txt | 5 ++++-
|
| 17 | 1 file changed, 4 insertions(+), 1 deletion(-)
|
| 18 |
|
| 19 | diff --git a/CMakeLists.txt b/CMakeLists.txt
|
| 20 | index 1902f0e618119..975a402f8adc2 100644
|
| 21 | |
| 22 | |
| 23 | @@ -320,8 +320,11 @@ if (WITH_SYSTEM_PROVIDED_3PARTY)
|
| 24 | set(GFLAGS_USE_TARGET_NAMESPACE ON)
|
| 25 | find_package(gflags REQUIRED)
|
| 26 |
|
| 27 | + find_package(PkgConfig)
|
| 28 | + pkg_check_modules(jansson REQUIRED IMPORTED_TARGET jansson)
|
| 29 | + add_library(jansson::jansson ALIAS PkgConfig::jansson)
|
| 30 | +
|
| 31 | find_package(expat CONFIG REQUIRED)
|
| 32 | - find_package(jansson CONFIG REQUIRED)
|
| 33 | find_package(pugixml REQUIRED)
|
| 34 | find_package(utf8cpp REQUIRED)
|
| 35 | endif()
|