gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

commit 7798f8b3d7bcbf24daa45596b666cf4410e1c84e
parent 0bc20788d5f6f3bb4a8a0c3cbe64dac1afad6974
Author: dsp56300 <dsp56300@users.noreply.github.com>
Date:   Thu, 24 Oct 2024 21:22:20 +0200

create new function for mac setup script installation to reduce code duplication

Diffstat:
Msource/juce.cmake | 10+++++-----
Msource/macsetup.cmake | 4++++
Msource/mqPerformanceTest/CMakeLists.txt | 2+-
Msource/virusTestConsole/CMakeLists.txt | 4++--
4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/source/juce.cmake b/source/juce.cmake @@ -124,7 +124,7 @@ macro(createJucePlugin targetName productName isSynth plugin4CC binaryDataProjec if(USE_VST3) if(APPLE) install(TARGETS ${targetName}_VST3 DESTINATION . COMPONENT ${productName}-VST3) - install(FILES ${macSetupFile} DESTINATION . PERMISSIONS GROUP_EXECUTE COMPONENT ${productName}-VST3) + installMacSetupScript(. ${productName}-VST3) else() get_target_property(vst3OutputFolder ${targetName}_VST3 ARCHIVE_OUTPUT_DIRECTORY) if(UNIX) @@ -142,17 +142,17 @@ macro(createJucePlugin targetName productName isSynth plugin4CC binaryDataProjec if(USE_VST2 AND JUCE_GLOBAL_VST2_SDK_PATH) install(TARGETS ${targetName}_VST DESTINATION . COMPONENT ${productName}-VST2) if(APPLE) - install(FILES ${macSetupFile} DESTINATION . PERMISSIONS GROUP_EXECUTE COMPONENT ${productName}-VST2) + installMacSetupScript(. ${productName}-VST2) endif() endif() if(USE_AU AND APPLE) install(TARGETS ${targetName}_AU DESTINATION . COMPONENT ${productName}-AU) - install(FILES ${macSetupFile} DESTINATION . PERMISSIONS GROUP_EXECUTE COMPONENT ${productName}-AU) + installMacSetupScript(. ${productName}-AU) endif() if(USE_CLAP) install(TARGETS ${targetName}_CLAP DESTINATION . COMPONENT ${productName}-CLAP) if(APPLE) - install(FILES ${macSetupFile} DESTINATION . PERMISSIONS GROUP_EXECUTE COMPONENT ${productName}-CLAP) + installMacSetupScript(. ${productName}-CLAP) endif() endif() elseif(UNIX) @@ -180,7 +180,7 @@ macro(createJucePlugin targetName productName isSynth plugin4CC binaryDataProjec endif() install(DIRECTORY ${lv2OutputFolder}/${productName}.lv2 DESTINATION ${dest} COMPONENT ${productName}-LV2 FILES_MATCHING PATTERN ${pattern} PATTERN "*.ttl") if(APPLE) - install(FILES ${macSetupFile} DESTINATION ${dest} PERMISSIONS GROUP_EXECUTE COMPONENT ${productName}-LV2) + installMacSetupScript(${dest} ${productName}-LV2) endif() endif() diff --git a/source/macsetup.cmake b/source/macsetup.cmake @@ -5,3 +5,7 @@ macro(createMacSetupScript productName) set(macSetupFile ${CMAKE_CURRENT_BINARY_DIR}/macsetup.command) configure_file(${MACSETUP_SOURCE_DIR}/macsetup.command.in ${macSetupFile}) endmacro() + +macro(installMacSetupScript destination component) + install(FILES ${macSetupFile} DESTINATION ${destination} PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE COMPONENT ${component}) +endmacro() diff --git a/source/mqPerformanceTest/CMakeLists.txt b/source/mqPerformanceTest/CMakeLists.txt @@ -22,7 +22,7 @@ endif() install(TARGETS mqPerformanceTest DESTINATION . COMPONENT VavraPerformanceTest) if(APPLE) - install(FILES ${macSetupFile} DESTINATION . PERMISSIONS GROUP_EXECUTE COMPONENT VavraPerformanceTest) + installMacSetupScript(. VavraPerformanceTest) endif() set_property(TARGET mqPerformanceTest PROPERTY FOLDER "Vavra") diff --git a/source/virusTestConsole/CMakeLists.txt b/source/virusTestConsole/CMakeLists.txt @@ -28,7 +28,7 @@ if(${gearmulator_SYNTH_OSIRUS}) install(DIRECTORY ${CMAKE_SOURCE_DIR}/deploy/linux/ DESTINATION . COMPONENT OsirusTestConsole) endif() if(APPLE) - install(FILES ${macSetupFile} DESTINATION . PERMISSIONS GROUP_EXECUTE COMPONENT OsirusTestConsole) + installMacSetupScript(. OsirusTestConsole) endif() endif() @@ -41,7 +41,7 @@ if(${gearmulator_SYNTH_OSTIRUS}) install(DIRECTORY ${CMAKE_SOURCE_DIR}/deploy/linux/ DESTINATION . COMPONENT OsTIrusTestConsole) endif() if(APPLE) - install(FILES ${macSetupFile} DESTINATION . PERMISSIONS GROUP_EXECUTE COMPONENT OsTIrusTestConsole) + installMacSetupScript(. OsTIrusTestConsole) endif() endif()