1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

CMake: Support using custom VST3 SDKs

This commit is contained in:
reuk 2021-03-30 16:17:16 +01:00
parent af4b727b8a
commit 429550f3dd
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
2 changed files with 26 additions and 4 deletions

View file

@ -611,10 +611,11 @@ target!).
juce_set_aax_sdk_path(<absolute path>)
juce_set_vst2_sdk_path(<absolute path>)
juce_set_vst3_sdk_path(<absolute path>)
Call these functions from your CMakeLists to set up your local AAX and/or VST2 SDKs. These functions
should be called *before* adding any targets that may depend on the AAX/VST2 SDKs (plugin
hosts, VST2/AAX plugins etc.).
Call these functions from your CMakeLists to set up your local AAX, VST2, and VST3 SDKs. These
functions should be called *before* adding any targets that may depend on the AAX/VST2/VST3 SDKs
(plugin hosts, AAX/VST2/VST3 plugins etc.).
#### `juce_add_module`

View file

@ -564,8 +564,13 @@ function(juce_add_module module_path)
if(${module_name} STREQUAL "juce_audio_processors")
add_library(juce_vst3_headers INTERFACE)
target_compile_definitions(juce_vst3_headers INTERFACE "$<$<TARGET_EXISTS:juce_vst3_sdk>:JUCE_CUSTOM_VST3_SDK=1>")
target_include_directories(juce_vst3_headers INTERFACE
"${base_path}/juce_audio_processors/format_types/VST3_SDK")
"$<$<TARGET_EXISTS:juce_vst3_sdk>:$<TARGET_PROPERTY:juce_vst3_sdk,INTERFACE_INCLUDE_DIRECTORIES>>"
"$<$<NOT:$<TARGET_EXISTS:juce_vst3_sdk>>:${base_path}/juce_audio_processors/format_types/VST3_SDK>")
target_link_libraries(juce_audio_processors INTERFACE juce_vst3_headers)
if(JUCE_ARG_ALIAS_NAMESPACE)
@ -2350,6 +2355,22 @@ function(juce_set_vst2_sdk_path path)
"${path}")
endfunction()
function(juce_set_vst3_sdk_path path)
if(TARGET juce_vst3_sdk)
message(FATAL_ERROR "juce_set_vst3_sdk_path should only be called once")
endif()
_juce_make_absolute(path)
if(NOT EXISTS "${path}")
message(FATAL_ERROR "Could not find VST3 SDK at the specified path: ${path}")
endif()
add_library(juce_vst3_sdk INTERFACE IMPORTED GLOBAL)
target_include_directories(juce_vst3_sdk INTERFACE "${path}")
endfunction()
# ==================================================================================================
function(juce_disable_default_flags)