blob: c95676a18cfe5f8ceaa63e93f0e0c02f537627e5 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
https://github.com/audacity/audacity/commit/6edaa3f26b34adc65c109c1a5a85923e04330e2d
https://github.com/audacity/audacity/pull/4918
From 6edaa3f26b34adc65c109c1a5a85923e04330e2d Mon Sep 17 00:00:00 2001
From: Dmitry Vedenko <dmitry@crsib.me>
Date: Mon, 7 Aug 2023 17:12:49 +0300
Subject: [PATCH] Fixes RapidJSON missing from Linux builds
---
.../cmake-modules/dependencies/rapidjson.cmake | 15 +++++++++++++--
linux/packages/arch/dependencies.sh | 1 +
linux/packages/fedora34/dependencies.sh | 1 +
3 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake b/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake
index c44aad81b8e4..ba95962a6eb6 100644
--- a/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake
+++ b/cmake-proxies/cmake-modules/dependencies/rapidjson.cmake
@@ -1,7 +1,18 @@
# CCI pakage appears to set the wrong value for the `cmake_target_name`
-if(${_OPT}use_rapidjson STREQUAL "local")
+if(NOT ${_OPT}use_rapidjson STREQUAL "off")
if(NOT TARGET rapidjson::rapidjson)
- add_library( rapidjson::rapidjson ALIAS rapidjson )
+ if(TARGET rapidjson)
+ add_library( rapidjson::rapidjson ALIAS rapidjson )
+ else()
+ # At least on Arch RapidJSONConfig.cmake does not define a target at all
+ # so we have to do it ourselves
+ add_library( rapidjson::rapidjson INTERFACE IMPORTED GLOBAL)
+ if (RAPIDJSON_INCLUDE_DIRS )
+ target_include_directories( rapidjson::rapidjson INTERFACE ${RAPIDJSON_INCLUDE_DIRS} )
+ elseif(RapidJSON_INCLUDE_DIR)
+ target_include_directories( rapidjson::rapidjson INTERFACE ${RapidJSON_INCLUDE_DIR} )
+ endif()
+ endif()
endif()
endif()
diff --git a/linux/packages/arch/dependencies.sh b/linux/packages/arch/dependencies.sh
index d34012442efd..8aa8792057d4 100755
--- a/linux/packages/arch/dependencies.sh
+++ b/linux/packages/arch/dependencies.sh
@@ -44,6 +44,7 @@ deps=(
wavpack
wxwidgets-gtk3
vst3sdk
+ rapidjson
)
pacman -Syu --noconfirm \
diff --git a/linux/packages/fedora34/dependencies.sh b/linux/packages/fedora34/dependencies.sh
index 8f6ce8ff2eb8..1e039612b095 100755
--- a/linux/packages/fedora34/dependencies.sh
+++ b/linux/packages/fedora34/dependencies.sh
@@ -54,6 +54,7 @@ deps=(
mesa-libEGL-devel
mpg123-devel
wavpack-devel
+ rapidjson
)
dnf install -y \
|