### Add VST Hosting Examples Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Adds the subdirectory for VST hosting examples. This includes the validator, which should be built before any plugins to ensure proper validation. ```cmake set(SDK_IDE_HOSTING_EXAMPLES_FOLDER FOLDER "Hosting-Examples") add_subdirectory(public.sdk/samples/vst-hosting) ``` -------------------------------- ### Build VST3 examples on Linux Source: https://github.com/steinbergmedia/vst3sdk/wiki/Get-Started Standard CMake build process for Linux environments. ```bash mkdir build cd build cmake ../vst3sdk make (or alternatively cmake --build .) ``` -------------------------------- ### Build VST3 examples on Windows Source: https://github.com/steinbergmedia/vst3sdk/wiki/Get-Started Build process using Visual Studio generators and MSBuild. ```bash mkdir build cd build cmake.exe -G"Visual Studio 15 2017 Win64" ../vst3sdk msbuild.exe vstsdk.sln (or alternatively cmake --build .) ``` -------------------------------- ### Build VST3 examples on macOS Source: https://github.com/steinbergmedia/vst3sdk/wiki/Get-Started Build process using the Xcode generator for macOS. ```bash mkdir build cd build cmake -GXcode ../vst3sdk xcodebuild (or alternatively cmake --build .) ``` -------------------------------- ### Add VST 3 Plugin Examples Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Conditionally adds the VST 3 plugin examples and the AUv3 wrapper if VST 3 plugin examples are enabled. This allows building and testing various VST 3 plugin types. ```cmake if(SMTG_ENABLE_VST3_PLUGIN_EXAMPLES) set(SDK_IDE_PLUGIN_EXAMPLES_FOLDER FOLDER "PlugIn-Examples") add_subdirectory(public.sdk/samples/vst) add_subdirectory(public.sdk/source/vst/auv3wrapper) endif() ``` -------------------------------- ### Setup Core Audio and AAX Support Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Includes functions to set up support for Core Audio (macOS/iOS) and AAX (Avid Audio Extension) SDKs. Also includes the Jack audio connection kit. ```cmake setupCoreAudioSupport() setupAaxSupport() include(SMTG_FindJack) ``` -------------------------------- ### Build VST 3 Plugins on Linux Source: https://context7.com/steinbergmedia/vst3sdk/llms.txt Installs dependencies and builds VST 3 plugins using CMake and Make on Linux. ```bash # Install required packages (Ubuntu 24.04 LTS) sudo apt-get install cmake gcc g++ libx11-dev libxcb1-dev libxkbcommon-dev \ libxkbcommon-x11-dev libfontconfig1-dev libcairo2-dev libgtkmm-3.0-dev \ libsqlite3-dev libxcb-util-dev libxcb-cursor-dev libxcb-keysyms1-dev \ libxcb-xkb-dev # Create and enter build directory mkdir build cd build # Generate Makefiles cmake ../vst3sdk # Build (uses all available cores) make -j$(nproc) # Alternative: Build Release configuration cmake --build . --config Release ``` -------------------------------- ### Platform Toolset and Symbol Visibility Setup Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Configures platform-specific toolsets and symbol visibility settings for the project. These are essential for cross-platform compatibility and symbol management. ```cmake smtg_setup_platform_toolset() smtg_setup_symbol_visibility() ``` -------------------------------- ### Global CMake Options Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Defines global options that can be controlled via the CMake command line, such as enabling plugin examples or VSTGUI support. These options allow customization of the build. ```cmake option(SMTG_ENABLE_VST3_PLUGIN_EXAMPLES "Enable VST 3 Plug-in Examples" ON) ``` ```cmake option(SMTG_ENABLE_VST3_HOSTING_EXAMPLES "Enable VST 3 Hosting Examples" ON) ``` ```cmake option(SMTG_ENABLE_VSTGUI_SUPPORT "Enable VSTGUI Support" ON) ``` ```cmake option(SMTG_ENABLE_WAYLAND_SUPPORT "Enable Wayland Support (Linux only)" OFF) ``` -------------------------------- ### Launch cmake-gui Source: https://context7.com/steinbergmedia/vst3sdk/llms.txt Launches the cmake-gui application for visual configuration of the VST 3 SDK build. Follow the steps to set source and build directories, review options, and generate project files. ```bash # Launch cmake-gui cmake-gui # Step-by-step process: # 1. Click "Browse Source..." and select the vst3sdk folder # 2. Click "Browse Build..." and select/create a "build" folder # 3. Review and modify SMTG options as needed: # - SMTG_ENABLE_VST3_PLUGIN_EXAMPLES: ON/OFF # - SMTG_ENABLE_VST3_HOSTING_EXAMPLES: ON/OFF # - SMTG_ENABLE_VSTGUI_SUPPORT: ON/OFF # - SMTG_ENABLE_WAYLAND_SUPPORT: ON/OFF (Linux) # 4. Click "Configure" to configure the project # 5. Click "Generate" to create platform-specific project files # Output: # - Windows: vstsdk.sln (Visual Studio solution) # - macOS: vstsdk.xcodeproj (Xcode project) # - Linux: Makefiles ``` -------------------------------- ### Clone VST 3 SDK Repository Source: https://context7.com/steinbergmedia/vst3sdk/llms.txt Initializes the SDK repository and verifies the presence of required submodules. ```bash # Clone the SDK with all submodules recursively git clone --recursive https://github.com/steinbergmedia/vst3sdk.git # Navigate to the SDK directory cd vst3sdk # Verify submodules are present ls -la # Expected: base/ cmake/ doc/ pluginterfaces/ public.sdk/ tutorials/ vstgui4/ ``` -------------------------------- ### Build VST 3 on Windows Source: https://github.com/steinbergmedia/vst3sdk/blob/master/README.md Commands to compile the generated solution using msbuild or CMake. ```bash msbuild.exe vstsdk.sln // (or alternatively for example for release) cmake --build . --config Release ``` -------------------------------- ### Configure External SDK Support Source: https://context7.com/steinbergmedia/vst3sdk/llms.txt Sets up support for external audio SDKs including Core Audio, AAX, and JACK, and adds necessary wrapper subdirectories. ```cmake # Setup external SDK support setupCoreAudioSupport() # For Audio Unit wrappers on macOS/iOS setupAaxSupport() # For AAX wrapper (Pro Tools) include(SMTG_FindJack) # For JACK audio support # Add wrapper subdirectories if(NOT SMTG_ENABLE_AUV2_BUILDS) add_subdirectory(public.sdk/source/vst/auwrapper) endif() if(NOT "${SMTG_AAX_SDK_PATH}" STREQUAL "") add_subdirectory(public.sdk/source/vst/aaxwrapper) endif() # Add AUv3 wrapper for iOS/macOS add_subdirectory(public.sdk/source/vst/auv3wrapper) ``` -------------------------------- ### Create Build Directory Source: https://github.com/steinbergmedia/vst3sdk/blob/master/README.md Standard procedure to create and enter a build directory before running CMake. ```bash mkdir build cd build ``` -------------------------------- ### VST 3 Plugin Delivery Formats Source: https://context7.com/steinbergmedia/vst3sdk/llms.txt Illustrates the directory structure and file locations for VST 3 plugins on Windows, macOS, and Linux platforms. ```bash # Windows: DLL packaged in folder structure # Location: C:\Program Files\Common Files\VST3\ # Structure: # MyPlugin.vst3/ # ├── Contents/ # │ ├── x86_64-win/ # │ │ └── MyPlugin.vst3 (DLL) # │ └── Resources/ # │ └── plugin.vst3.xml # macOS: Mach-O Bundle # Location: /Library/Audio/Plug-Ins/VST3/ # Structure: # MyPlugin.vst3/ # ├── Contents/ # │ ├── Info.plist # │ ├── MacOS/ # │ │ └── MyPlugin # │ └── Resources/ # Linux: Package/Bundle # Location: ~/.vst3/ or /usr/lib/vst3/ # Structure: # MyPlugin.vst3/ # ├── Contents/ # │ ├── x86_64-linux/ # │ │ └── MyPlugin.so # │ └── Resources/ ``` -------------------------------- ### Clone the VST3 SDK repository Source: https://github.com/steinbergmedia/vst3sdk/wiki/Get-Started Use this command to download the source code and its submodules from GitHub. ```bash git clone --recursive https://github.com/steinbergmedia/vst3sdk.git ``` -------------------------------- ### Build VST 3 on Linux Source: https://github.com/steinbergmedia/vst3sdk/blob/master/README.md Commands to compile the project on Linux using make or CMake. ```bash make // (or alternatively for example for release) cmake --build . --config Release ``` -------------------------------- ### Enable VSTGUI Support Source: https://context7.com/steinbergmedia/vst3sdk/llms.txt Configures VSTGUI integration, optionally enabling Wayland support for graphical user interfaces in VST 3 plugins. ```cmake # Enable VSTGUI with optional Wayland support if(SMTG_ENABLE_VSTGUI_SUPPORT) set(VSTGUI_ENABLE_WAYLAND_SUPPORT ${SMTG_ENABLE_WAYLAND_SUPPORT}) smtg_enable_vstgui_support(VSTGUI_SOURCE_DIR "${ROOT}/vstgui4") endif() # VSTGUI creates these targets for linking: # - vstgui : Core VSTGUI library # - vstgui_support : Platform support utilities # - vstgui_uidescription : XML-based UI description support # - vstgui_standalone : Standalone application support (if available) ``` -------------------------------- ### Build VST 3 Plugins on Windows Source: https://context7.com/steinbergmedia/vst3sdk/llms.txt Configures and compiles VST 3 plugins using CMake and MSBuild on Windows. ```bash # Create and enter build directory mkdir build cd build # Generate Visual Studio 2022 solution for x64 architecture cmake.exe -G "Visual Studio 17 2022" -A x64 ../vst3sdk # Alternative: Generate without symbolic links (useful for permission issues) cmake.exe -G "Visual Studio 17 2022" -A x64 ../vst3sdk -DSMTG_CREATE_PLUGIN_LINK=0 # Alternative: Use local user program folder for VST3 output cmake.exe -G "Visual Studio 17 2022" -A x64 ../vst3sdk -DSMTG_PLUGIN_TARGET_USER_PROGRAM_FILES_COMMON=1 # Build the solution (Debug by default) msbuild.exe vstsdk.sln # Build Release configuration cmake --build . --config Release ``` -------------------------------- ### Build VST 3 on macOS Source: https://github.com/steinbergmedia/vst3sdk/blob/master/README.md Commands to compile the project on macOS using xcodebuild or CMake. ```bash xcodebuild // (or alternatively for example for release) cmake --build . --config Release ``` -------------------------------- ### Project Definition Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Defines the main project with its version, description, and homepage URL. This sets up the overall project context for CMake. ```cmake project(vstsdk VERSION 3.8.0 DESCRIPTION "Steinberg VST 3 Software Development Kit" HOMEPAGE_URL "https://www.steinberg.net" ) ``` -------------------------------- ### Set SDK Root Paths and Include Modules Source: https://context7.com/steinbergmedia/vst3sdk/llms.txt Configures CMake to locate SDK directories and include necessary modules for building VST 3 plugins. ```cmake set(ROOT "${CMAKE_CURRENT_SOURCE_DIR}") set(SDK_ROOT "${ROOT}") set(public_sdk_SOURCE_DIR ${SDK_ROOT}/public.sdk) set(pluginterfaces_SOURCE_DIR ${SDK_ROOT}/pluginterfaces) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") include(SMTG_VST3_SDK) smtg_setup_platform_toolset() smtg_setup_symbol_visibility() smtg_create_lib_base_target() # Base utilities smtg_create_pluginterfaces_target() # VST 3 interfaces smtg_create_public_sdk_common_target() # Common SDK code smtg_create_public_sdk_target() # Plugin SDK smtg_create_public_sdk_hosting_target() # Hosting SDK ``` -------------------------------- ### Enable VSTGUI Support Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Conditionally enables VSTGUI support based on the SMTG_ENABLE_VSTGUI_SUPPORT option. It also sets the Wayland support for VSTGUI and calls the function to set up VSTGUI. ```cmake if(SMTG_ENABLE_VSTGUI_SUPPORT) set(VSTGUI_ENABLE_WAYLAND_SUPPORT ${SMTG_ENABLE_WAYLAND_SUPPORT}) smtg_enable_vstgui_support(VSTGUI_SOURCE_DIR "${ROOT}/vstgui4") endif() ``` -------------------------------- ### Include VST3 SDK Module Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Includes the main VST3 SDK CMake module, which sets up essential SDK configurations. ```cmake include(SMTG_VST3_SDK) ``` -------------------------------- ### Build VST 3 Plugins on macOS Source: https://context7.com/steinbergmedia/vst3sdk/llms.txt Configures and compiles VST 3 plugins using CMake and Xcode on macOS. ```bash # Create and enter build directory mkdir build cd build # Generate Xcode project cmake -GXcode ../vst3sdk # Alternative: Build without Xcode (Debug variant) cmake -DCMAKE_BUILD_TYPE=Debug ../vst3sdk # Build using xcodebuild xcodebuild # Build Release configuration cmake --build . --config Release # Expected output location: build/VST3/Release/*.vst3 ``` -------------------------------- ### Add AUv2 Wrapper Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Adds the subdirectory for the Audio Unit v2 wrapper. This is conditionally included based on the SMTG_ENABLE_AUV2_BUILDS option. ```cmake if (NOT SMTG_ENABLE_AUV2_BUILDS) add_subdirectory(public.sdk/source/vst/auwrapper) endif() ``` -------------------------------- ### Generate Windows Build Files Source: https://github.com/steinbergmedia/vst3sdk/blob/master/README.md Commands to generate Visual Studio project files using CMake on Windows. ```cmake // examples: cmake.exe -G "Visual Studio 17 2022" -A x64 ..\vst3sdk // or without symbolic links cmake.exe -G "Visual Studio 17 2022" -A x64 ..\vst3sdk -DSMTG_CREATE_PLUGIN_LINK=0 // or by using the local user program folder (FOLDERID_UserProgramFilesCommon) as VST3 folder cmake.exe -G "Visual Studio 17 2022" -A x64 -DSMTG_PLUGIN_TARGET_USER_PROGRAM_FILES_COMMON=1 ``` -------------------------------- ### Create Base Library Targets Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Creates the base library targets for the VST 3 SDK, including common, interfaces, and public SDK components. These are fundamental building blocks for VST plugins. ```cmake smtg_create_lib_base_target() smtg_create_pluginterfaces_target() smtg_create_public_sdk_common_target() smtg_create_public_sdk_target() smtg_create_public_sdk_hosting_target() ``` -------------------------------- ### Include Directories Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Adds the project root and SDK root directories to the include path. This allows source files to find headers within these directories. ```cmake include_directories(${ROOT} ${SDK_ROOT}) ``` -------------------------------- ### Add VST Utilities Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Adds the subdirectory for VST utilities. These are helper tools and libraries that can be used in VST development. ```cmake set(SDK_IDE_UTILITIES_FOLDER FOLDER "Utilities") add_subdirectory(public.sdk/samples/vst-utilities) ``` -------------------------------- ### Generate Linux Build Files Source: https://github.com/steinbergmedia/vst3sdk/blob/master/README.md Command to generate build files on Linux using CMake. ```cmake cmake ../vst3sdk ``` -------------------------------- ### Generate macOS Build Files Source: https://github.com/steinbergmedia/vst3sdk/blob/master/README.md Commands to generate Xcode projects or Makefiles on macOS. ```cmake // For XCode: cmake -GXcode ../vst3sdk // Without XCode (here debug variant): cmake -DCMAKE_BUILD_TYPE=Debug ../ ``` -------------------------------- ### Add VST Inter-App Audio Wrapper Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Adds the subdirectory for the VST Inter-App Audio wrapper. This enables VST plugins to run within other audio applications on iOS. ```cmake set(VST_SDK TRUE) # used for pluginterfaces and public.sdk modules which provides only a subset of them for VST-SDK add_subdirectory(public.sdk/source/vst/interappaudio) ``` -------------------------------- ### Configure VST 3 Build Features Source: https://context7.com/steinbergmedia/vst3sdk/llms.txt Defines CMake options to enable or disable specific SDK components and platform features. ```cmake # CMakeLists.txt options (or pass via -D flags) # Enable/disable VST 3 plugin examples (default: ON) option(SMTG_ENABLE_VST3_PLUGIN_EXAMPLES "Enable VST 3 Plug-in Examples" ON) # Enable/disable VST 3 hosting examples (default: ON) option(SMTG_ENABLE_VST3_HOSTING_EXAMPLES "Enable VST 3 Hosting Examples" ON) # Enable/disable VSTGUI support for UI (default: ON) option(SMTG_ENABLE_VSTGUI_SUPPORT "Enable VSTGUI Support" ON) # Enable Wayland support on Linux (default: OFF) option(SMTG_ENABLE_WAYLAND_SUPPORT "Enable Wayland Support (Linux only)" OFF) # Generate macOS/iOS collection targets (default: OFF) option(SMTG_VSTSDK_GENERATE_MACOS_IOS_COLLECTION_TARGETS "Create macOS and iOS collection targets" OFF) ``` ```bash # Example: Build without plugin examples and VSTGUI cmake -G "Visual Studio 17 2022" -A x64 ../vst3sdk \ -DSMTG_ENABLE_VST3_PLUGIN_EXAMPLES=OFF \ -DSMTG_ENABLE_VSTGUI_SUPPORT=OFF # Example: Build with Wayland support on Linux cmake ../vst3sdk -DSMTG_ENABLE_WAYLAND_SUPPORT=ON ``` -------------------------------- ### Set macOS Deployment Target Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Configures the minimum macOS deployment target version. This is set to '10.13' if not already defined by an environment variable. ```cmake if(NOT DEFINED ENV{MACOSX_DEPLOYMENT_TARGET}) set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "macOS deployment target") endif() ``` -------------------------------- ### Add AAX Wrapper Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Adds the subdirectory for the AAX wrapper. This is included only if the SMTG_AAX_SDK_PATH variable is set, indicating the AAX SDK is available. ```cmake if(NOT "${SMTG_AAX_SDK_PATH}" STREQUAL "") add_subdirectory(public.sdk/source/vst/aaxwrapper) endif() ``` -------------------------------- ### Set SDK Root Directory Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Defines the root directory of the VST 3 SDK. This is used to locate other SDK components. ```cmake set(ROOT "${CMAKE_CURRENT_SOURCE_DIR}") set(SDK_ROOT "${ROOT}") set(public_sdk_SOURCE_DIR ${SDK_ROOT}/public.sdk) set(pluginterfaces_SOURCE_DIR ${SDK_ROOT}/pluginterfaces) ``` -------------------------------- ### Set IDE Folder for VSTGUI Targets Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Assigns the 'Libraries' folder property to VSTGUI-related targets if VSTGUI support is enabled. This organizes VSTGUI components in the IDE. ```cmake if(SMTG_ENABLE_VSTGUI_SUPPORT) set_property( TARGET vstgui vstgui_support vstgui_uidescription PROPERTY ${SDK_IDE_LIBS_FOLDER} ) if(TARGET vstgui_standalone) set_target_properties(vstgui_standalone PROPERTIES ${SDK_IDE_LIBS_FOLDER} ) endif() endif() ``` -------------------------------- ### Set IDE Folder for AAX Wrapper Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Assigns the 'Libraries' folder property to the AAX wrapper target if it exists. This organizes the AAX wrapper in the IDE. ```cmake if(TARGET aax_wrapper) set_target_properties(aax_wrapper PROPERTIES ${SDK_IDE_LIBS_FOLDER} ) endif() ``` -------------------------------- ### Generate macOS and iOS Collection Targets Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt This option enables the creation of custom targets for collecting all iOS and macOS build targets. It requires a recursive function to discover all targets within the source directory. ```cmake option(SMTG_VSTSDK_GENERATE_MACOS_IOS_COLLECTION_TARGETS "Create macOS and iOS collection targets" OFF) if(SMTG_VSTSDK_GENERATE_MACOS_IOS_COLLECTION_TARGETS) function(get_all_targets var) set(targets) get_all_targets_recursive(targets ${CMAKE_CURRENT_SOURCE_DIR}) set(${var} ${targets} PARENT_SCOPE) endfunction() macro(get_all_targets_recursive targets dir) get_property(subdirectories DIRECTORY ${dir} PROPERTY SUBDIRECTORIES) foreach(subdir ${subdirectories}) get_all_targets_recursive(${targets} ${subdir}) endforeach() get_property(current_targets DIRECTORY ${dir} PROPERTY BUILDSYSTEM_TARGETS) list(APPEND ${targets} ${current_targets}) endmacro() get_all_targets(all_targets) add_custom_target(iOS_Targets) add_custom_target(macOS_Targets) foreach(target_name ${all_targets}) if(${target_name} MATCHES "ios") add_dependencies(iOS_Targets ${target_name}) else() add_dependencies(macOS_Targets ${target_name}) endif() endforeach() endif() ``` -------------------------------- ### Set Minimum CMake Version Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Specifies the minimum required version of CMake for the project. Ensure your CMake version meets this requirement. ```cmake cmake_minimum_required (VERSION 3.25.0) ``` -------------------------------- ### Set IDE Folder for Libraries Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Assigns the 'Libraries' folder property to various core SDK targets. This helps organize these libraries within an IDE's project structure. ```cmake set_property( TARGET sdk sdk_common sdk_hosting base pluginterfaces cmake_modules cmake_VST_modules PROPERTY ${SDK_IDE_LIBS_FOLDER} ) ``` -------------------------------- ### Include Custom Module Target Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Includes a custom CMake module for target management. This is used for organizing targets within IDEs. ```cmake include(SMTG_CustomModuleTarget) ``` -------------------------------- ### Set IDE Folder for iOS Libraries Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Assigns the 'Libraries' folder property to iOS-specific targets if they exist. This organizes iOS libraries within the IDE. ```cmake if(TARGET base_ios) set_property( TARGET base_ios pluginterfaces_ios PROPERTY ${SDK_IDE_LIBS_FOLDER} ) endif() ``` -------------------------------- ### Append CMake Module Path Source: https://github.com/steinbergmedia/vst3sdk/blob/master/CMakeLists.txt Adds the 'cmake/modules' directory to the CMake module search path. This allows CMake to find custom modules within the project. ```cmake list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.