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

CMake: Ensure that juce_lv2_helper is built when source groups are enabled

This commit is contained in:
reuk 2022-10-24 16:06:02 +01:00
parent 5ad617edc0
commit 3061876e0d
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
2 changed files with 19 additions and 16 deletions

View file

@ -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)

View file

@ -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 "$<TARGET_FILE:${target_name}>"
COMMAND juce_lv2_helper "$<TARGET_FILE:${target_name}>"
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)