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 Date: Mon, 7 Aug 2023 17:12:49 +0300 Subject: [PATCH] Fixes RapidJSON missing from Linux builds --- 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() --- 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 \ --- 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 \