radiotray-ng: bump to C++17 to fix link against jsoncpp 1.9.7

This commit is contained in:
Harinn 2026-05-08 17:12:37 +07:00
commit efc938433a
2 changed files with 4 additions and 13 deletions

View file

@ -87,7 +87,6 @@ stdenv.mkDerivation (finalAttrs: {
patches = [
./no-dl-googletest.patch
./tests-c++17.patch
];
postPatch = ''
@ -96,6 +95,10 @@ stdenv.mkDerivation (finalAttrs: {
done
substituteInPlace package/CMakeLists.txt --replace /etc/xdg/autostart $out/etc/xdg/autostart
# jsoncpp 1.9.7 only exports std::string_view overloads under C++17
substituteInPlace CMakeLists.txt \
--replace-fail "set(CMAKE_CXX_STANDARD 14)" "set(CMAKE_CXX_STANDARD 17)"
# We don't find the radiotray-ng-notification icon otherwise
substituteInPlace data/radiotray-ng.desktop \
--replace radiotray-ng-notification radiotray-ng-on

View file

@ -1,12 +0,0 @@
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 58ab5c2..4f56a25 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,5 +1,7 @@
include(GoogleTest)
+set(CMAKE_CXX_STANDARD 17)
+
function(add_gmock_test target)
add_executable(${target} ${ARGN})
target_link_libraries(${target} config playlist bookmarks event_bus ${GMOCK_BOTH_LIBRARIES} ${XDG_BASEDIR_LIBRARIES} ${Boost_LIBRARIES} ${CURL_LIBRARIES} ${JSONCPP_LIBRARIES} pthread)