diff --git a/extras/Build/CMake/JUCEModuleSupport.cmake b/extras/Build/CMake/JUCEModuleSupport.cmake index 02db69868d..25d53400d5 100644 --- a/extras/Build/CMake/JUCEModuleSupport.cmake +++ b/extras/Build/CMake/JUCEModuleSupport.cmake @@ -441,6 +441,8 @@ function(juce_add_module module_path) _juce_module_sources("${module_path}" "${base_path}" globbed_sources headers) if(${module_name} STREQUAL "juce_audio_plugin_client") + list(REMOVE_ITEM headers "${module_path}/LV2/juce_LV2TurtleDumpProgram.cpp") + _juce_get_platform_plugin_kinds(plugin_kinds) foreach(kind IN LISTS plugin_kinds) diff --git a/extras/Build/CMake/JUCEUtils.cmake b/extras/Build/CMake/JUCEUtils.cmake index 9bad0c230c..d86ce8a997 100644 --- a/extras/Build/CMake/JUCEUtils.cmake +++ b/extras/Build/CMake/JUCEUtils.cmake @@ -834,6 +834,22 @@ endfunction() # ================================================================================================== +function(_juce_add_lv2_manifest_helper_target) + if(TARGET juce_lv2_helper) + return() + endif() + + get_target_property(module_path juce::juce_audio_plugin_client INTERFACE_JUCE_MODULE_PATH) + set(source "${module_path}/juce_audio_plugin_client/LV2/juce_LV2TurtleDumpProgram.cpp") + add_executable(juce_lv2_helper "${source}") + add_executable(juce::juce_lv2_helper ALIAS juce_lv2_helper) + target_compile_features(juce_lv2_helper PRIVATE cxx_std_14) + set_target_properties(juce_lv2_helper PROPERTIES BUILD_WITH_INSTALL_RPATH ON) + target_link_libraries(juce_lv2_helper PRIVATE ${CMAKE_DL_LIBS}) +endfunction() + +# ================================================================================================== + function(_juce_set_plugin_target_properties shared_code_target kind) set(target_name ${shared_code_target}_${kind}) @@ -974,7 +990,7 @@ function(_juce_set_plugin_target_properties shared_code_target kind) _juce_add_lv2_manifest_helper_target() add_custom_command(TARGET ${target_name} POST_BUILD - COMMAND juce::juce_lv2_helper "$" + COMMAND juce_lv2_helper "$" VERBATIM) _juce_set_copy_properties(${shared_code_target} ${target_name} "${output_path}" JUCE_LV2_COPY_DIR) @@ -1718,21 +1734,6 @@ endfunction() # ================================================================================================== -function(_juce_add_lv2_manifest_helper_target) - if(TARGET juce_lv2_helper) - return() - endif() - - get_target_property(module_path juce::juce_audio_plugin_client INTERFACE_JUCE_MODULE_PATH) - add_executable(juce_lv2_helper "${module_path}/juce_audio_plugin_client/LV2/juce_LV2TurtleDumpProgram.cpp") - add_executable(juce::juce_lv2_helper ALIAS juce_lv2_helper) - target_compile_features(juce_lv2_helper PRIVATE cxx_std_17) - set_target_properties(juce_lv2_helper PROPERTIES BUILD_WITH_INSTALL_RPATH ON) - target_link_libraries(juce_lv2_helper PRIVATE ${CMAKE_DL_LIBS}) -endfunction() - -# ================================================================================================== - function(juce_add_console_app target) add_executable(${target}) target_compile_definitions(${target} PRIVATE JUCE_STANDALONE_APPLICATION=1)