File JUCE7-CMake-Link-filesystem-library-to-vst3_helper-when.patch of Package JUCE7_06
From 3fae79c17c4275813332a733bbfc38c9ff141bfb Mon Sep 17 00:00:00 2001
From: reuk <reuk@users.noreply.github.com>
Date: Mon, 18 Sep 2023 12:51:27 +0100
Subject: [PATCH] CMake: Link filesystem library to vst3_helper when building
with gcc7
---
extras/Build/CMake/JUCEUtils.cmake | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake
index 16fb97fb380..87771fd63ce 100644
--- a/extras/Build/CMake/JUCEUtils.cmake
+++ b/extras/Build/CMake/JUCEUtils.cmake
@@ -997,6 +997,10 @@ function(_juce_add_vst3_manifest_helper_target)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(juce_vst3_helper PRIVATE Threads::Threads ${CMAKE_DL_LIBS} juce_recommended_config_flags)
+
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9)
+ target_link_libraries(juce_vst3_helper PRIVATE stdc++fs)
+ endif()
endfunction()
function(juce_enable_vst3_manifest_step shared_code_target)