### Install AudioGridder via Homebrew Source: https://github.com/apohl79/audiogridder/blob/master/README.md Commands to install the AudioGridder plugin and server components on macOS using Homebrew. ```bash brew install audiogridder-plugin ``` ```bash brew install audiogridder-server ``` -------------------------------- ### Build AudioGridder from source Source: https://github.com/apohl79/audiogridder/blob/master/DEVELOP.md Commands to clone the repository, fetch dependencies, and compile the project on supported platforms. ```bash # Checkout the code git clone --recurse-submodules https://github.com/apohl79/audiogridder.git cd audiogridder # Checkout the dependencies git clone https://github.com/apohl79/audiogridder-deps.git # Configure and compile python3 build.py conf --disable-signing python3 build.py build ``` -------------------------------- ### Configure PluginTray CMake Project Source: https://github.com/apohl79/audiogridder/blob/master/PluginTray/CMakeLists.txt Initializes the project, sets up platform-specific icons, and defines the JUCE GUI application target. ```cmake cmake_minimum_required(VERSION 3.15) project(AUDIOGRIDDER_PLUGIN_TRAY VERSION 1.0.0) set(AG_ICON_BIG "${CMAKE_CURRENT_SOURCE_DIR}/Resources/icon.png") set(AG_ICON_SMALL "${CMAKE_CURRENT_SOURCE_DIR}/Resources/icon.png") if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(AG_ICON_BIG "${CMAKE_CURRENT_SOURCE_DIR}/Resources/icon64.png") set(AG_ICON_SMALL "${CMAKE_CURRENT_SOURCE_DIR}/Resources/icon16.png") endif() juce_add_gui_app(AudioGridderPluginTray VERSION "${AG_VERSION}" PRODUCT_NAME "AudioGridderPluginTray" COMPANY_NAME "e47" COMPANY_COPYRIGHT "2020 Andreas Pohl" COMPANY_WEBSITE "https://www.audiogridder.com" PLUGINHOST_AU TRUE ICON_BIG "${AG_ICON_BIG}" ICON_SMALL "${AG_ICON_SMALL}") juce_generate_juce_header(AudioGridderPluginTray) ``` -------------------------------- ### Apply Platform-Specific Post-Build Steps Source: https://github.com/apohl79/audiogridder/blob/master/PluginTray/CMakeLists.txt Applies stripping and macOS-specific bundle operations like crashpad integration and signing. ```cmake ag_strip(AudioGridderPluginTray Tray) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") ag_bundle_add_crashpad(AudioGridderPluginTray) ag_bundle_sign(AudioGridderPluginTray) if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND AG_ENABLE_DEBUG_COPY_STEP) ag_bundle_copy(AudioGridderPluginTray /Applications/Debug) endif() endif() ``` -------------------------------- ### Link Libraries and Manage Resources Source: https://github.com/apohl79/audiogridder/blob/master/PluginTray/CMakeLists.txt Adds binary data resources and links necessary JUCE and system libraries to the PluginTray target. ```cmake juce_add_binary_data(AudioGridderPluginTrayData SOURCES Resources/icon.png Resources/icon16.png Resources/icon64.png) target_link_libraries(AudioGridderPluginTray PRIVATE AudioGridderPluginTrayData juce::juce_graphics juce::juce_gui_extra juce::juce_recommended_config_flags juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags ${SENTRY_LIBRARIES}) if(CMAKE_SYSTEM_NAME STREQUAL "Linux") target_link_libraries(AudioGridderPluginTray PRIVATE X11 Xtst) endif() ``` -------------------------------- ### Configure Sentry Dependencies Source: https://github.com/apohl79/audiogridder/blob/master/CMakeLists.txt Sets up Sentry include directories and library paths based on the target operating system. ```cmake if(AG_ENABLE_SENTRY) set(SENTRY_INCLUDE_DIR ${SENTRY_ROOT}/include) message(STATUS "Using Sentry: ${SENTRY_ROOT}") message(STATUS "Using Sentry DSN: ${AG_SENTRY_DSN}") if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(SENTRY_LIBRARIES ${SENTRY_ROOT}/lib/crashpad_compat.lib ${SENTRY_ROOT}/lib/crashpad_minidump.lib ${SENTRY_ROOT}/lib/crashpad_snapshot.lib ${SENTRY_ROOT}/lib/crashpad_util.lib ${SENTRY_ROOT}/lib/mini_chromium.lib ${SENTRY_ROOT}/lib/crashpad_client.lib ${SENTRY_ROOT}/lib/crashpad_zlib.lib ${SENTRY_ROOT}/lib/crashpad_tools.lib ${SENTRY_ROOT}/lib/crashpad_handler_lib.lib ${SENTRY_ROOT}/lib/sentry.lib winhttp.lib) else() find_package(CURL REQUIRED) set(SENTRY_LIBRARIES ${SENTRY_ROOT}/lib/libcrashpad_client.a ${SENTRY_ROOT}/lib/libcrashpad_handler_lib.a ${SENTRY_ROOT}/lib/libcrashpad_minidump.a ${SENTRY_ROOT}/lib/libcrashpad_snapshot.a ${SENTRY_ROOT}/lib/libcrashpad_tools.a ${SENTRY_ROOT}/lib/libcrashpad_util.a ${SENTRY_ROOT}/lib/libmini_chromium.a ${SENTRY_ROOT}/lib/libsentry.a ${CURL_LIBRARIES}) endif() if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") list(APPEND SENTRY_LIBRARIES "-framework Security" bsm) elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") list(INSERT SENTRY_LIBRARIES 0 "-Wl,--start-group") list(APPEND SENTRY_LIBRARIES "-Wl,--end-group") endif() if(CMAKE_BUILD_TYPE STREQUAL "Debug") set(AG_SENTRY_CRASHPAD_PATH "${SENTRY_ROOT}/bin/crashpad_handler") else() set(AG_SENTRY_CRASHPAD_PATH "") endif() set(AG_SENTRY_ENABLED 1) else() set(AG_SENTRY_ENABLED 0) endif() ``` -------------------------------- ### AudioGridder Server CMake Build Configuration Source: https://github.com/apohl79/audiogridder/blob/master/Server/CMakeLists.txt Configures the AudioGridder Server project, including platform-specific icon paths, JUCE application settings, source file inclusion, and target-specific compiler definitions and library linking. ```cmake cmake_minimum_required(VERSION 3.15) project(AUDIOGRIDDER_SERVER VERSION 1.0.0) set(AG_ICON_BIG "${CMAKE_CURRENT_SOURCE_DIR}/Resources/icon.png") set(AG_ICON_SMALL "${CMAKE_CURRENT_SOURCE_DIR}/Resources/icon.png") if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set(AG_ICON_BIG "${CMAKE_CURRENT_SOURCE_DIR}/Resources/icon64.png") set(AG_ICON_SMALL "${CMAKE_CURRENT_SOURCE_DIR}/Resources/icon16.png") endif() juce_add_gui_app(AudioGridderServer VERSION "${AG_VERSION}" PRODUCT_NAME "AudioGridderServer" COMPANY_NAME "e47" COMPANY_COPYRIGHT "2020-2022 Andreas Pohl" COMPANY_WEBSITE "https://www.audiogridder.com" PLUGINHOST_AU TRUE ICON_BIG "${AG_ICON_BIG}" ICON_SMALL "${AG_ICON_SMALL}") juce_generate_juce_header(AudioGridderServer) aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Source AG_SOURCES_SERVER) aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Source/ServerSettings AG_SOURCES_SERVER_SETTINGS) if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin") list(REMOVE_ITEM AG_SOURCES_SERVER "${CMAKE_CURRENT_SOURCE_DIR}/Source/Screen.mm") endif() if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux") list(REMOVE_ITEM AG_SOURCES_SERVER "${CMAKE_CURRENT_SOURCE_DIR}/Source/ScreenHelper_linux.cpp") endif() target_sources(AudioGridderServer PRIVATE ${AG_SOURCES_SERVER} ${AG_SOURCES_SERVER_SETTINGS} ${AG_SOURCES_COMMON}) set(AG_PLUGINHOST_VST 0) if(AG_SDKS_ROOT) set(AG_PLUGINHOST_VST 1) endif() target_compile_definitions(AudioGridderServer PRIVATE AG_SERVER AG_SENTRY_ENABLED=${AG_SENTRY_ENABLED} AG_SENTRY_DSN="${AG_SENTRY_DSN}" AG_SENTRY_CRASHPAD_PATH="${AG_SENTRY_CRASHPAD_PATH}" JUCE_PLUGINHOST_VST3=1 JUCE_PLUGINHOST_VST=${AG_PLUGINHOST_VST} JUCE_PLUGINHOST_LV2=1 JUCE_WEB_BROWSER=0 JUCE_USE_CURL=0 JUCE_MODAL_LOOPS_PERMITTED=1 JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING JUCE_DISABLE_ASSERTIONS JUCE_APPLICATION_NAME_STRING="$" JUCE_APPLICATION_VERSION_STRING="$" JUCE_DISPLAY_SPLASH_SCREEN=0) target_compile_features(AudioGridderServer PRIVATE cxx_std_14) juce_add_binary_data(AudioGridderServerData SOURCES Resources/icon.png Resources/icon16.png Resources/icon64.png) target_link_libraries(AudioGridderServer PRIVATE AudioGridderServerData juce::juce_audio_basics juce::juce_audio_processors juce::juce_audio_formats juce::juce_graphics juce::juce_gui_extra juce::juce_recommended_config_flags juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags ${FFMPEG_LIBRARIES} ${WEBP_LIBRARIES} ${SENTRY_LIBRARIES}) if(CMAKE_SYSTEM_NAME STREQUAL "Linux") target_link_libraries(AudioGridderServer PRIVATE X11 Xtst xcb xcb-shm xcb-xfixes xcb-shape) target_compile_definitions(AudioGridderServer PRIVATE JUCE_LINUX=1) endif() ag_strip(AudioGridderServer Server) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") target_link_libraries(AudioGridderServer PRIVATE "-framework AVFoundation" "-framework CoreMedia" "-framework OpenGL" "-framework Security") if(AG_MACOS_TARGET STRGREATER_EQUAL 10.8) target_link_libraries(AudioGridderServer PRIVATE "-framework VideoToolbox") endif() ag_bundle_add_crashpad(AudioGridderServer) ag_bundle_sign(AudioGridderServer) if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(AG_ENABLE_ASAN) target_compile_options(AudioGridderServer PRIVATE -fsanitize=address -fno-omit-frame-pointer) target_link_options(AudioGridderServer PRIVATE -fsanitize=address) endif() if(AG_ENABLE_DEBUG_COPY_STEP) ag_bundle_copy(AudioGridderServer /Applications/Debug) endif() endif() endif() ``` -------------------------------- ### Define PluginTray Build Targets and Definitions Source: https://github.com/apohl79/audiogridder/blob/master/PluginTray/CMakeLists.txt Configures source files, compile definitions, and C++ standards for the PluginTray target. ```cmake aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/Source AG_SOURCES_PLUGIN_TRAY) target_sources(AudioGridderPluginTray PRIVATE ${AG_SOURCES_PLUGIN_TRAY} ${AG_SOURCES_COMMON}) target_compile_definitions(AudioGridderPluginTray PRIVATE AG_PLUGIN_TRAY AG_SENTRY_ENABLED=${AG_SENTRY_ENABLED} AG_SENTRY_DSN="${AG_SENTRY_DSN}" AG_SENTRY_CRASHPAD_PATH="${AG_SENTRY_CRASHPAD_PATH}" JUCE_WEB_BROWSER=0 JUCE_USE_CURL=0 JUCE_MODAL_LOOPS_PERMITTED=1 JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING JUCE_DISABLE_ASSERTIONS JUCE_APPLICATION_NAME_STRING="$" JUCE_APPLICATION_VERSION_STRING="$") target_compile_features(AudioGridderPluginTray PRIVATE cxx_std_14) ``` -------------------------------- ### Define AudioGridder Plugin Macro Source: https://github.com/apohl79/audiogridder/blob/master/Plugin/CMakeLists.txt The ag_add_plugin macro encapsulates the configuration and build steps for different plugin types, including format support and target properties. ```cmake macro(ag_add_plugin type) cmake_parse_arguments(AG "" "PLUGIN_CODE;IS_SYNTH;IS_MIDI_EFFECT;VST3_CATEGORY;VST_CATEGORY;AAX_CATEGORY;AU_TYPE" "" ${ARGN}) set(pluginname "AGridder") set(productname "AudioGridder") if(NOT ${type} STREQUAL "Fx") string(TOLOWER "${type}" type_LC) set(pluginname "${pluginname} (${type_LC})") set(productname "${productname}${type}") endif() set(AG_FORMATS AU VST3) if(AG_VST2_PLUGIN_ENABLED) list(APPEND AG_FORMATS VST) endif() if(AG_AAX_PLUGIN_ENABLED) list(APPEND AG_FORMATS AAX) endif() juce_add_plugin(AudioGridder${type} VERSION "${AG_VERSION}" PLUGIN_NAME "${pluginname}" PRODUCT_NAME "${productname}" COMPANY_NAME "e47" COMPANY_COPYRIGHT "2020-2022 Andreas Pohl" COMPANY_WEBSITE "https://www.audiogridder.com" DESCRIPTION "${pluginname}" PLUGIN_MANUFACTURER_CODE XE47 PLUGIN_CODE ${AG_PLUGIN_CODE} FORMATS ${AG_FORMATS} IS_SYNTH ${AG_IS_SYNTH} NEEDS_MIDI_INPUT TRUE NEEDS_MIDI_OUTPUT TRUE IS_MIDI_EFFECT ${AG_IS_MIDI_EFFECT} EDITOR_WANTS_KEYBOARD_FOCUS FALSE VST_NUM_MIDI_INS 16 VST_NUM_MIDI_OUTS 16 VST2_CATEGORY ${AG_VST_CATEGORY} VST3_CATEGORIES Network ${AG_VST3_CATEGORY} AAX_CATEGORY ${AG_AAX_CATEGORY} AU_MAIN_TYPE ${AG_AU_TYPE} AU_SANDBOX_SAFE TRUE SUPPRESS_AU_PLIST_RESOURCE_USAGE TRUE COPY_PLUGIN_AFTER_BUILD FALSE) juce_generate_juce_header(AudioGridder${type}) target_sources(AudioGridder${type} PRIVATE ${AG_SOURCES_PLUGIN} ${AG_SOURCES_COMMON}) target_compile_definitions(AudioGridder${type} PRIVATE AG_PLUGIN AG_SENTRY_ENABLED=${AG_SENTRY_ENABLED} AG_SENTRY_DSN="${AG_SENTRY_DSN}" AG_SENTRY_CRASHPAD_PATH="${AG_SENTRY_CRASHPAD_PATH}" JUCE_VST3_CAN_REPLACE_VST2=0 JUCE_MODAL_LOOPS_PERMITTED=1 JUCE_WEB_BROWSER=0 JUCE_USE_CURL=0 JUCE_DISABLE_AUDIOPROCESSOR_BEGIN_END_GESTURE_CHECKING JUCE_DISABLE_ASSERTIONS) target_compile_features(AudioGridder${type} PRIVATE cxx_std_14) target_link_libraries(AudioGridder${type} PRIVATE juce::juce_audio_plugin_client juce::juce_audio_utils juce::juce_graphics juce::juce_gui_extra ${FFMPEG_LIBRARIES} ${WEBP_LIBRARIES} ${SENTRY_LIBRARIES} PUBLIC juce::juce_recommended_config_flags juce::juce_recommended_lto_flags juce::juce_recommended_warning_flags) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") target_link_libraries(AudioGridder${type} PRIVATE "-framework CoreMedia" "-framework VideoToolbox" ) ag_strip(AudioGridder${type}_AU AU) endif() if(AG_VST2_PLUGIN_ENABLED) ag_strip(AudioGridder${type}_VST VST) endif() ag_strip(AudioGridder${type}_VST3 VST3) if(AG_AAX_PLUGIN_ENABLED) ag_strip(AudioGridder${type}_AAX AAX) ag_bundle_sign_aax(AudioGridder${type}_AAX) endif() if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") ag_bundle_add_crashpad(AudioGridder${type}_AU) ag_bundle_add_crashpad(AudioGridder${type}_VST3) ag_bundle_sign(AudioGridder${type}_AU) ag_bundle_sign(AudioGridder${type}_VST3) if(AG_VST2_PLUGIN_ENABLED) ag_bundle_add_crashpad(AudioGridder${type}_VST) ag_bundle_sign(AudioGridder${type}_VST) endif() if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND AG_ENABLE_DEBUG_COPY_STEP) get_target_property(AG_AU_DEST AudioGridder${type} JUCE_AU_COPY_DIR) get_target_property(AG_VST3_DEST AudioGridder${type} JUCE_VST3_COPY_DIR) get_target_property(AG_AAX_DEST AudioGridder${type} JUCE_AAX_COPY_DIR) ag_bundle_copy(AudioGridder${type}_AU ${AG_AU_DEST}) ag_bundle_copy(AudioGridder${type}_VST3 ${AG_VST3_DEST}) if(AG_VST2_PLUGIN_ENABLED) get_target_property(AG_VST_DEST AudioGridder${type} JUCE_VST_COPY_DIR) ag_bundle_copy(AudioGridder${type}_VST ${AG_VST_DEST}) endif() if(AG_AAX_PLUGIN_ENABLED) ag_bundle_copy(AudioGridder${type}_AAX ${AG_AAX_DEST}) endif() endif() endif() if(CMAKE_SYSTEM_NAME STREQUAL "Windows") set_target_properties(AudioGridder${type}_VST3 PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib/VST3 LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib/VST3 ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/lib/VST3 LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/lib/VST3) if(AG_VST2_PLUGIN_ENABLED) set_target_properties(AudioGridder${type}_VST PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib/VST LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib/VST ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/lib/VST LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/lib/VST) endif() endif() endmacro() ``` -------------------------------- ### Run code formatter Source: https://github.com/apohl79/audiogridder/blob/master/DEVELOP.md Execute the project's code formatter before submitting pull requests to ensure style compliance. ```bash python3 build.py format ``` -------------------------------- ### Define copy utility macros Source: https://github.com/apohl79/audiogridder/blob/master/CMakeLists.txt Macros for copying bundles or files to a destination directory as a post-build step. ```cmake macro(ag_bundle_copy target_name dst_dir) add_custom_target(${target_name}_COPY ALL DEPENDS ${target_name}_SIGN COMMAND ${CMAKE_COMMAND} -E echo "Copying bundle $ to ${dst_dir}" COMMAND rm -rf ${dst_dir}/`basename $` COMMAND cp -a $ ${dst_dir} ) endmacro() macro(ag_file_copy target_name dst_dir) add_custom_target(${target_name}_COPY ALL DEPENDS ${target_name} COMMAND ${CMAKE_COMMAND} -E echo "Copying file $ to ${dst_dir}" COMMAND ${CMAKE_COMMAND} -E copy $ ${dst_dir} ) endmacro() ``` -------------------------------- ### Register AudioGridder Plugins Source: https://github.com/apohl79/audiogridder/blob/master/Plugin/CMakeLists.txt Registers different plugin types using the ag_add_plugin macro with specific category and type identifiers. ```cmake ag_add_plugin(Fx PLUGIN_CODE E401 IS_SYNTH FALSE IS_MIDI_EFFECT FALSE VST3_CATEGORY Fx VST_CATEGORY kPlugCategEffect AAX_CATEGORY AAX_EPlugInCategory_Effect AU_TYPE kAudioUnitType_Effect) ``` ```cmake ag_add_plugin(Inst PLUGIN_CODE E402 IS_SYNTH TRUE IS_MIDI_EFFECT FALSE VST3_CATEGORY Instrument VST_CATEGORY kPlugCategSynth AAX_CATEGORY AAX_ePlugInCategory_SWGenerators AU_TYPE kAudioUnitType_MusicDevice) ``` ```cmake ag_add_plugin(Midi PLUGIN_CODE E403 IS_SYNTH FALSE IS_MIDI_EFFECT TRUE VST3_CATEGORY Fx VST_CATEGORY kPlugCategEffect AAX_CATEGORY AAX_ePlugInCategory_None AU_TYPE kAudioUnitType_MIDIProcessor) ``` -------------------------------- ### Display build status messages Source: https://github.com/apohl79/audiogridder/blob/master/CMakeLists.txt Outputs the current status of build configuration variables to the console. ```cmake message(STATUS "Dynamic linking: ${AG_ENABLE_DYNAMIC_LINKING}") message(STATUS "Code signing: ${AG_ENABLE_CODE_SIGNING}") message(STATUS "VST2 plugins: ${AG_VST2_PLUGIN_ENABLED}") message(STATUS "AAX plugins: ${AG_AAX_PLUGIN_ENABLED}") if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND AG_ENABLE_DEBUG_COPY_STEP) message(STATUS "Copy step of binaries after building is enabled.") endif() ``` -------------------------------- ### Define ag_bundle_sign_aax macro Source: https://github.com/apohl79/audiogridder/blob/master/CMakeLists.txt Handles platform-specific AAX plugin signing for macOS and Windows. ```cmake if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") macro(ag_bundle_sign_aax target_name) if(AG_ENABLE_CODE_SIGNING) add_custom_target(${target_name}_SIGN ALL DEPENDS ${target_name}_STRIP COMMAND ${CMAKE_COMMAND} -E echo "Signing AAX bundle $" COMMAND aax_sign.sh $ || echo "AAX signing not available" ) else() add_custom_target(${target_name}_SIGN ALL DEPENDS ${target_name}_STRIP COMMAND ${CMAKE_COMMAND} -E echo "Code signing disabled. Not signing AAX bundle $" ) endif() endmacro() else() macro(ag_bundle_sign_aax target_name) if(AG_ENABLE_CODE_SIGNING) add_custom_target(${target_name}_SIGN ALL DEPENDS ${target_name}_STRIP COMMAND ${CMAKE_COMMAND} -E echo "Creating AAX plugin bundle $" COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/lib/AAX/signed/$/Contents/x64 COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_BINARY_DIR}/lib/AAX/signed/$/Contents/x64 COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/package/desktop.ini ${CMAKE_BINARY_DIR}/lib/AAX/signed/$ COMMAND attrib +h +r +s ${CMAKE_BINARY_DIR}/lib/AAX/signed/$/desktop.ini COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/package/PlugIn.ico ${CMAKE_BINARY_DIR}/lib/AAX/signed/$ COMMAND attrib +h +r +s ${CMAKE_BINARY_DIR}/lib/AAX/signed/$/PlugIn.ico COMMAND ${CMAKE_COMMAND} -E echo "Signing AAX plugin $" COMMAND aax_sign.bat ${CMAKE_BINARY_DIR}/lib/AAX/signed/$ ) else() add_custom_target(${target_name}_SIGN ALL DEPENDS ${target_name}_STRIP COMMAND ${CMAKE_COMMAND} -E echo "Code signing disabled. Not signing AAX plugin $" ) endif() endmacro() endif() ``` -------------------------------- ### Define Crashpad Bundling Macro Source: https://github.com/apohl79/audiogridder/blob/master/CMakeLists.txt Adds a custom target to include the crashpad handler in the application bundle if Sentry is enabled. ```cmake macro(ag_bundle_add_crashpad target_name) if(AG_ENABLE_SENTRY) add_custom_target(${target_name}_CRASHPAD ALL DEPENDS ${target_name}_STRIP COMMAND ${CMAKE_COMMAND} -E echo "Adding crashpad to bundle $" COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/bin/crashpad_handler $/Contents/MacOS ) else() add_custom_target(${target_name}_CRASHPAD ALL DEPENDS ${target_name} COMMAND ${CMAKE_COMMAND} -E echo "Sentry disabled, not adding crashpad to $" ) endif() endmacro() ``` -------------------------------- ### Define ag_bundle_sign macro Source: https://github.com/apohl79/audiogridder/blob/master/CMakeLists.txt Creates a custom target to sign a macOS bundle if AG_ENABLE_CODE_SIGNING is enabled. ```cmake macro(ag_bundle_sign target_name) if(AG_ENABLE_CODE_SIGNING) add_custom_target(${target_name}_SIGN ALL DEPENDS ${target_name}_CRASHPAD COMMAND ${CMAKE_COMMAND} -E echo "Signing bundle $" COMMAND ${CMAKE_COMMAND} -E remove_directory $/Contents/_CodeSignature COMMAND /usr/bin/codesign --force --sign AudioGridder --timestamp=none $ ) else() add_custom_target(${target_name}_SIGN ALL DEPENDS ${target_name}_CRASHPAD COMMAND ${CMAKE_COMMAND} -E echo "Code signing disabled. Not signing bundle $" ) endif() endmacro() ``` -------------------------------- ### Configure AAX Plugin Target Properties Source: https://github.com/apohl79/audiogridder/blob/master/Plugin/CMakeLists.txt Sets output directories for AAX plugin binaries within the build tree when the AAX plugin is enabled. ```cmake if(AG_AAX_PLUGIN_ENABLED) set_target_properties(AudioGridder${type}_AAX PROPERTIES ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib/AAX LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/lib/AAX ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/lib/AAX LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/lib/AAX) endif() endif() endmacro() ``` -------------------------------- ### Define Binary Stripping Macro Source: https://github.com/apohl79/audiogridder/blob/master/CMakeLists.txt Creates custom targets to copy debug symbols and strip binaries for Darwin, Linux, and Windows platforms. ```cmake macro(ag_strip target_name target_dir) if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") add_custom_target(${target_name}_DBGSYM ALL DEPENDS ${target_name} COMMAND ${CMAKE_COMMAND} -E echo "Copying debug symbols for $" COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/debug/${target_dir} COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_BINARY_DIR}/debug/${target_dir} #COMMAND # /usr/bin/dsymutil -o ${CMAKE_BINARY_DIR}/debug/${target_dir}/$.dSYM $ ) add_custom_target(${target_name}_STRIP ALL DEPENDS ${target_name}_DBGSYM COMMAND ${CMAKE_COMMAND} -E echo "Stripping file $" COMMAND /usr/bin/strip -S $ ) elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") add_custom_target(${target_name}_DBGSYM ALL DEPENDS ${target_name} COMMAND ${CMAKE_COMMAND} -E echo "Copying debug symbols for $" COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/debug/${target_dir} COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_BINARY_DIR}/debug/${target_dir} ) add_custom_target(${target_name}_STRIP ALL DEPENDS ${target_name}_DBGSYM COMMAND ${CMAKE_COMMAND} -E echo "Stripping file $" COMMAND /usr/bin/strip $ ) elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") add_custom_target(${target_name}_STRIP ALL DEPENDS ${target_name} COMMAND ${CMAKE_COMMAND} -E echo "Copying debug symbols for $" COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/debug/${target_dir} COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_BINARY_DIR}/debug/${target_dir} COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_BINARY_DIR}/debug/${target_dir} ) endif() endmacro() ``` -------------------------------- ### Conditionally include project components Source: https://github.com/apohl79/audiogridder/blob/master/CMakeLists.txt Uses build flags to determine whether to include plugin, server, or test subdirectories. ```cmake if(AG_WITH_PLUGIN) message(STATUS "Plugin enabled. Use -DAG_WITH_PLUGIN=OFF to deactivate building the plugins.") add_subdirectory(Plugin) add_subdirectory(PluginTray) else() message(STATUS "Plugin disabled.") endif() if(AG_WITH_SERVER) message(STATUS "Server enabled. Use -DAG_WITH_SERVER=OFF to deactivate building the server.") add_subdirectory(Server) else() message(STATUS "Server disabled.") endif() ``` -------------------------------- ### Configure JUCE compiler warning flags Source: https://github.com/apohl79/audiogridder/blob/master/CMakeLists.txt Sets compiler-specific warning suppression flags for the juce_recommended_warning_flags interface target. ```cmake if((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")) target_compile_options(juce_recommended_warning_flags INTERFACE -Wno-unused-variable -Wno-unused-function -Wno-deprecated -Wno-switch-enum -Wno-missing-prototypes -Wno-c99-extensions) elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") target_compile_options(juce_recommended_warning_flags INTERFACE -Wno-unused-variable -Wno-unused-but-set-variable -Wno-switch-enum) elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") target_compile_options(juce_recommended_warning_flags INTERFACE /wd4189 /wd4505) endif() ``` -------------------------------- ### Enable unit tests Source: https://github.com/apohl79/audiogridder/blob/master/CMakeLists.txt Conditionally includes the Tests subdirectory if AG_WITH_TESTS is enabled. ```cmake if(AG_WITH_TESTS) message(STATUS "Unit tests enabled.") add_subdirectory(Tests) else() message(STATUS "Unit tests disabled.") endif() ``` -------------------------------- ### Define TraceReader executable Source: https://github.com/apohl79/audiogridder/blob/master/CMakeLists.txt Configures the tracereader executable target with specific compiler features, visibility settings, and library links. ```cmake if(AG_WITH_TRACEREADER) message(STATUS "Tracereader enabled.") add_executable(tracereader "${CMAKE_CURRENT_SOURCE_DIR}/Common/Source/TraceReader.cpp") target_compile_features(tracereader PRIVATE cxx_std_14) target_compile_options(tracereader PRIVATE "-fvisibility=hidden") target_link_libraries(tracereader ${Boost_LIBRARIES}) if(AG_ENABLE_DEBUG_COPY_STEP) ag_file_copy(tracereader $ENV{HOME}/bin) endif() endif() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.