From 8058733864b21ffe27300e97fc4b3550aad2069d Mon Sep 17 00:00:00 2001 From: Dan Raviv Date: Thu, 11 Apr 2024 19:12:19 -0700 Subject: [PATCH] Fix include paths inconsistency in case vst2 sdk path is set All include paths set by JUCE are regular, non-system ones, -except- if a vst2 sdk path is set, in which case both the vst2 sdk path and the vst3 sdk path (custom or not) become system includes. This commit removes the exceptional behavior. The sdks include paths order (VST3 preceding VST2) is kept. --- extras/Build/CMake/JUCEModuleSupport.cmake | 3 ++- extras/Build/CMake/JUCEUtils.cmake | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/extras/Build/CMake/JUCEModuleSupport.cmake b/extras/Build/CMake/JUCEModuleSupport.cmake index e18dd5e0874d..461abb80be31 100644 --- a/extras/Build/CMake/JUCEModuleSupport.cmake +++ b/extras/Build/CMake/JUCEModuleSupport.cmake @@ -498,7 +498,8 @@ function(juce_add_module module_path) target_include_directories(juce_vst3_headers INTERFACE "$<$:$>" - "$<$>:${base_path}/juce_audio_processors/format_types/VST3_SDK>") + "$<$>:${base_path}/juce_audio_processors/format_types/VST3_SDK>" + "$<$:$>") target_link_libraries(juce_audio_processors INTERFACE juce_vst3_headers) diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake index ac995f0e0c25..e8a3a0fceefd 100644 --- a/extras/Build/CMake/JUCEUtils.cmake +++ b/extras/Build/CMake/JUCEUtils.cmake @@ -1965,7 +1965,6 @@ function(_juce_initialise_target target) target_include_directories(${target} PRIVATE $) - target_link_libraries(${target} PUBLIC $<$:juce_vst2_sdk>) get_target_property(is_pluginhost_au ${target} JUCE_PLUGINHOST_AU) @@ -2291,10 +2290,7 @@ function(juce_set_vst2_sdk_path path) add_library(juce_vst2_sdk INTERFACE IMPORTED GLOBAL) - # This is a bit of a hack, but we really need the VST2 paths to always follow the VST3 paths. - target_include_directories(juce_vst2_sdk INTERFACE - $ - "${path}") + target_include_directories(juce_vst2_sdk INTERFACE "${path}") endfunction() function(juce_set_vst3_sdk_path path)