Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
8214964
Added windows toolchain to cmake\toolchains
ErikJour Jan 19, 2026
0206ec7
initial windows toolchain setup verified
ErikJour Feb 2, 2026
10b0eec
Removed root-level Cmake Windows setup
ErikJour Feb 2, 2026
015a21a
Updated windows toolchain with third-party cmake commands
ErikJour Feb 2, 2026
54bb047
Plugin-specific Cmake adjustments
ErikJour Feb 2, 2026
2c167b1
Added macos toolchain, cleaned up individual plugin cmakes
ErikJour Feb 3, 2026
23eada8
Added cmake function for setting plugin-specific JUCE values
ErikJour Feb 3, 2026
f46e873
Organized root-level cmake
ErikJour Feb 3, 2026
c17a36a
Formatted root-level cmake and windows toolchain
ErikJour Feb 3, 2026
6b270a7
Ready to clean up copy_resources
ErikJour Feb 4, 2026
331d8a4
Cleaned up copy resources
ErikJour Feb 4, 2026
e43b69f
Moving to mac toolchain setup
ErikJour Feb 4, 2026
6576d03
Root Cmake platform-agnostic
ErikJour Feb 5, 2026
2c91be5
Completed platform-agnostic third_party Cmake
ErikJour Feb 5, 2026
ec035ba
Updated individual third-party cmakes
ErikJour Feb 5, 2026
ea6db70
Refactored macos cmake files
ErikJour Feb 5, 2026
84d4ab4
Cross-platform root level Cmake refactor complete
ErikJour Feb 6, 2026
514fa61
Cross-platform third-party Cmake refactor complete
ErikJour Feb 6, 2026
b7d1a46
Cross-platform library Cmake refactors complete
ErikJour Feb 6, 2026
6fcc9d7
Cross-platform Windows Cmake refactor ready
ErikJour Feb 6, 2026
8fe52a4
Comment edits on prebuiltLibs
ErikJour Feb 6, 2026
7767997
Updated readme with toolchain instructions
ErikJour Feb 6, 2026
9787fa0
Updated Windows readme section with toolchain
ErikJour Feb 6, 2026
c46edd1
Updated readme
ErikJour Feb 6, 2026
b8c27ad
Updated workflows in .github
ErikJour Feb 9, 2026
7b33db8
Resolved license typo in copy resources
ErikJour Feb 9, 2026
683f2b1
Added previous comments back to OBR Cmake
ErikJour Feb 9, 2026
ca9e93e
Returned add icon comments to previous state
ErikJour Feb 9, 2026
0b04785
Replaced macos.cmake with Cmakelists.txt in github workflows per pr c…
ErikJour Feb 9, 2026
d029c8c
Removed 2.6gb test folder from libiamf download
ErikJour Feb 9, 2026
e0d3dfc
Updated workflows for toolchains
ErikJour Feb 10, 2026
45bf457
Fixed test linking
ErikJour Feb 10, 2026
866f54d
Adjusted vcpkg commands for remote workflows
ErikJour Feb 10, 2026
444f000
Returned to prior vcpkg setup
ErikJour Feb 10, 2026
c16c18c
Updated Windows workflow
ErikJour Feb 10, 2026
66862a5
Updated github workflow document and zlib config on windows
ErikJour Feb 10, 2026
1b9449a
Updated Rpath on macos
ErikJour Feb 10, 2026
69446c5
Updated eclipsa-tests Cmake for cross-platform build
ErikJour Feb 11, 2026
cd674a0
Fix VCPKG_CHAINLOAD_TOOLCHAIN_FILE to use absolute path
ErikJour Feb 11, 2026
773b994
updated eclipsa_test.cmake to fix windows crash on tests in workflows
ErikJour Feb 12, 2026
9fafcce
Merged upstream changes
ErikJour Feb 12, 2026
89aa684
Updated eclipsa_test cmake
ErikJour Feb 12, 2026
dbb79c8
Updated eclipsa_build_tests
ErikJour Feb 13, 2026
1f9d98d
Merge branch 'main' into cmake-toolchain-refactor
ErikJour Feb 18, 2026
5178604
All tests are passing locally
ErikJour Feb 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-14, windows-latest]
os: [ macos-14, windows-latest ]

steps:
- name: Checkout
Expand Down Expand Up @@ -272,6 +272,30 @@ jobs:
Write-Warning "Could not find lib or lib/intel64 under MKLROOT"
Get-ChildItem "$env:MKLROOT" -Recurse -Depth 2
}
# --- vcpkg Setup (Windows) ---
- name: Export GitHub Actions cache environment variables
if: runner.os == 'Windows'
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');

- name: Setup vcpkg
if: runner.os == 'Windows'
shell: powershell
run: |
echo "VCPKG_ROOT=C:\vcpkg" | Out-File -FilePath $env:GITHUB_ENV -Append
cd C:\vcpkg
git pull
.\bootstrap-vcpkg.bat

# --- Install vcpkg dependencies (Windows) ---
- name: Install vcpkg dependencies
if: runner.os == 'Windows'
shell: powershell
run: |
vcpkg install --triplet x64-windows

# --- Configure (Windows) ---
- name: Configure CMake (Windows)
Expand All @@ -283,8 +307,10 @@ jobs:
-DBUILD_TESTING=ON `
-DZMQ_BUILD_TESTS=OFF `
-DMKL_ROOT="$env:MKLROOT" `
-DVCPKG_ROOT="$env:VCPKG_ROOT" `
-DVCPKG_TARGET_TRIPLET=x64-windows `
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake"
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" `
-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE="${{ github.workspace }}/cmake/toolchains/windows.cmake"

# --- Configure (macOS) ---
- name: Configure CMake (macOS)
Expand All @@ -295,7 +321,8 @@ jobs:
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-DBUILD_TESTING=ON \
-DZMQ_BUILD_TESTS=OFF
-DZMQ_BUILD_TESTS=OFF \
-DCMAKE_TOOLCHAIN_FILE="cmake/toolchains/macos.cmake"

# --- Build ---
- name: Build
Expand Down
249 changes: 123 additions & 126 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,64 +14,29 @@

cmake_minimum_required(VERSION 3.30.0)

if(WIN32)
# Disable vcpkg automatic DLL copying (applocal) - it fails without dumpbin in PATH
set(X_VCPKG_APPLOCAL_DEPS_INSTALL OFF CACHE BOOL "")

# Increase stack size to 16MB to prevent stack overflows
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:16777216")
endif()
#====================================================================
#Cmake Policies
#====================================================================
cmake_policy(SET CMP0167 NEW)
cmake_policy(SET CMP0077 NEW)
cmake_policy(SET CMP0169 OLD)

#====================================================================
# Disable vcpkg from finding Boost and Protobuf (provided by libiamf)
#====================================================================
set(CMAKE_DISABLE_FIND_PACKAGE_Boost ON CACHE BOOL "" FORCE)
set(CMAKE_DISABLE_FIND_PACKAGE_Protobuf ON CACHE BOOL "" FORCE)

#====================================================================
# Clear any cached Protobuf references
#====================================================================
unset(Protobuf_INCLUDE_DIRS CACHE)
unset(Protobuf_LIBRARIES CACHE)
unset(Protobuf_DIR CACHE)
unset(Protobuf_FOUND CACHE)
unset(Protobuf_PROTOC_EXECUTABLE CACHE)

cmake_policy(SET CMP0167 NEW)
cmake_policy(SET CMP0077 NEW)
cmake_policy(SET CMP0169 OLD)
set(CMAKE_CXX_EXTENSIONS OFF)

# Configure release or debug builds
set(BUILD_LIB_DIR "$<IF:$<CONFIG:Debug>,Debug,Release>")

# Windows vcpkg setup
if(WIN32 AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
# Try environment variable first (respects user's existing setup)
if(DEFINED ENV{VCPKG_ROOT})
set(VCPKG_ROOT "$ENV{VCPKG_ROOT}" CACHE PATH "Path to vcpkg root")
endif()

# Configure vcpkg if VCPKG_ROOT is set
if(DEFINED VCPKG_ROOT)
set(CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE FILEPATH "vcpkg toolchain file")

# Validate toolchain file exists
if(NOT EXISTS "${CMAKE_TOOLCHAIN_FILE}")
message(FATAL_ERROR "vcpkg toolchain file not found at: ${CMAKE_TOOLCHAIN_FILE}")
endif()

# Set default triplet if not specified
if(NOT DEFINED VCPKG_TARGET_TRIPLET)
set(VCPKG_TARGET_TRIPLET "x64-windows" CACHE STRING "vcpkg target triplet")
endif()

message(WARNING "vcpkg toolchain: ${CMAKE_TOOLCHAIN_FILE}")
message(WARNING "vcpkg triplet: ${VCPKG_TARGET_TRIPLET}")
else()
message(WARNING "vcpkg not configured. Please either:")
message(WARNING " 1. Set VCPKG_ROOT environment variable, or")
message(WARNING " 2. Pass -DVCPKG_ROOT=<path> to CMake")
message(WARNING "Build will continue without vcpkg - dependencies must be installed manually")
endif()
endif()

#====================================================================
# Version configuration
# The version can be set in multiple ways (in order of precedence):
# 1. Pass via command line: cmake -DECLIPSA_VERSION=1.2.3 ...
Expand All @@ -84,66 +49,72 @@ endif()
# - Or extract from git tag in your build script and pass it to CMake
#
# The version appears as a watermark in the bottom-left corner of both plugins.
if(NOT DEFINED ECLIPSA_VERSION)
#====================================================================
if (NOT DEFINED ECLIPSA_VERSION)
set(ECLIPSA_VERSION "0.0.1" CACHE STRING "Version for Eclipsa project")
endif()
endif ()

project(Eclipsa LANGUAGES C CXX VERSION ${ECLIPSA_VERSION})

#====================================================================
# Compiler Settings
#====================================================================
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_EXTENSIONS OFF)

#====================================================================
# Plugin Formats
#====================================================================
set(ECLIPSA_PLUGIN_FORMATS Standalone)

if (BUILD_VST3)
list(APPEND ECLIPSA_PLUGIN_FORMATS VST3)
endif ()
if (BUILD_AAX)
list(APPEND ECLIPSA_PLUGIN_FORMATS AAX)
endif ()

list(APPEND ECLIPSA_PLUGIN_FORMATS ${ECLIPSA_PLATFORM_PLUGIN_FORMATS})

#====================================================================
# Build Configuration
#====================================================================
set(BUILD_LIB_DIR "$<IF:$<CONFIG:Debug>,Debug,Release>")
add_compile_definitions(ECLIPSA_VERSION="${ECLIPSA_VERSION}")

#====================================================================
# Plugin Naming
#====================================================================
# Make company name configurable via command line with a default value
if(NOT DEFINED ECLIPSA_COMPANY_NAME)
if (NOT DEFINED ECLIPSA_COMPANY_NAME)
set(ECLIPSA_COMPANY_NAME "Eclipsa Project" CACHE STRING "Company name for Eclipsa project")
endif()

if(WIN32 AND NOT CMAKE_RC_COMPILER)
find_program(CMAKE_RC_COMPILER rc.exe
HINTS "C:/Program Files (x86)/Windows Kits/10/bin/*/x64")
endif()

endif ()
# Make manufacturer code configurable via command line with a default value
if(NOT DEFINED ECLIPSA_MANUFACTURER_CODE)
if (NOT DEFINED ECLIPSA_MANUFACTURER_CODE)
set(ECLIPSA_MANUFACTURER_CODE "Eclp" CACHE STRING "Manufacturer code for Eclipsa project")
endif()

endif ()
# Make bundle IDs configurable via command line with default values
if(NOT DEFINED ECLIPSA_RENDERER_BUNDLE_ID)
if (NOT DEFINED ECLIPSA_RENDERER_BUNDLE_ID)
set(ECLIPSA_RENDERER_BUNDLE_ID "com.eclipsaproject.renderer" CACHE STRING "Bundle ID for the renderer plugin")
endif()

if(NOT DEFINED ECLIPSA_PANNER_BUNDLE_ID)
endif ()
if (NOT DEFINED ECLIPSA_PANNER_BUNDLE_ID)
set(ECLIPSA_PANNER_BUNDLE_ID "com.eclipsaproject.panner" CACHE STRING "Bundle ID for the panner plugin")
endif()
endif ()

# Build configuration for different DAW targets
#====================================================================
# Build Options
#====================================================================
option(ECLIPSA_LOGIC_PRO_BUILD "Build AU plugin optimized for Logic Pro (7.1.4 layout)" OFF)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_BUILD_RPATH "@loader_path/../Resources;${CMAKE_SOURCE_DIR}")

# Set default plugin formats per platform
if(APPLE)
set(PLUGIN_FORMATS "AU")
elseif(WIN32)
set(PLUGIN_FORMATS "Standalone")
else()
set(PLUGIN_FORMATS "")
endif()

option(INTERNAL_TEST OFF)
option(CI_TEST OFF)
option(JUCE_COPY_PLUGIN_AFTER_BUILD "Automatically copy built plugins to standard locations after build" ON)

if(APPLE)
# Add vendored libraries path (for CI/GitHub Actions)
set(VENDOR_LIB_PATH "${CMAKE_SOURCE_DIR}/third_party/libiamf/lib/macos")
link_directories(${VENDOR_LIB_PATH})
endif()

if(CI_TEST OR INTERNAL_TEST)
#====================================================================
# Testing
#====================================================================
if (CI_TEST OR INTERNAL_TEST)
message(STATUS "Unit tests enabled")
include(FetchContent)
FetchContent_Declare(
Expand All @@ -162,60 +133,86 @@ if(CI_TEST OR INTERNAL_TEST)
if (FFMPEG_TOOLS_FOUND)
message(STATUS "FFmpeg found. Enabling tests that require FFmpeg.")
add_compile_definitions(ECLIPSA_FFMPEG_AVAILABLE=1)
else()
else ()
message(STATUS "FFmpeg not found. Tests requiring FFmpeg will be disabled.")
endif()
endif ()

# FFmpeg is required for CI tests
if(CI_TEST AND NOT FFMPEG_TOOLS_FOUND)
if (CI_TEST AND NOT FFMPEG_TOOLS_FOUND)
message(FATAL_ERROR "FFmpeg tools not found. Required for CI tests.")
endif()
endif()
endif ()
endif ()

add_subdirectory(third_party)
#====================================================================
# Cmake Functions
#====================================================================
include("${CMAKE_SOURCE_DIR}/cmake/copy_resources.cmake")
include("${CMAKE_SOURCE_DIR}/cmake/eclipsa_plugin_defaults.cmake")

# ZLIB configuration for Windows builds
#====================================================================
# Dependencies
#====================================================================
add_subdirectory(third_party)
if(WIN32)
find_package(ZLIB REQUIRED)
message(STATUS "ZLIB found at: ${ZLIB_LIBRARIES}")
# Fix link targets that request 'z'
link_libraries(ZLIB::ZLIB)
endif()
#====================================================================
# AAX Setup
#====================================================================
if (BUILD_AAX)
find_path(AAX_SDK_ROOT
NAMES "Interfaces/AAX_Exports.cpp"
HINTS "${AAX_SDK_SEARCH_HINT}"
DOC "Path to AAX SDK"
)

include("${CMAKE_SOURCE_DIR}/cmake/copy_resources.cmake")

if(BUILD_AAX)
if(WIN32)
set(AAX_SDK_VER "2-8-1" CACHE STRING "AAX SDK Version")
list(APPEND PLUGIN_FORMATS "AAX")

# Allow team members to specify their own AAX SDK path
if(NOT DEFINED AAX_SDK_ROOT)
set(AAX_SDK_ROOT "C:/Code/Repos/aax-sdk-${AAX_SDK_VER}" CACHE PATH "Path to AAX SDK")
endif()
else()
set(AAX_SDK_VER "2-7-0" CACHE STRING "Default AAX SDK Version")
list(APPEND PLUGIN_FORMATS "AAX")
find_path(AAX_SDK_ROOT NAMES "aax-sdk-${AAX_SDK_VER}" HINTS "/opt" "/usr/local")
set(AAX_SDK_ROOT "${AAX_SDK_ROOT}/aax-sdk-${AAX_SDK_VER}")
endif()

if(EXISTS "${AAX_SDK_ROOT}")
message(STATUS "Using AAX SDK at ${AAX_SDK_ROOT}")
if (AAX_SDK_ROOT)
message(STATUS "AAX SDK found: ${AAX_SDK_ROOT}")
juce_set_aax_sdk_path("${AAX_SDK_ROOT}")
else()
message(FATAL_ERROR "AAX SDK not found at ${AAX_SDK_ROOT}. Set AAX_SDK_ROOT to the correct path.")
endif()
endif()

if(BUILD_VST3)
list(APPEND PLUGIN_FORMATS "VST3")
endif()

else ()
message(FATAL_ERROR "AAX SDK not found. Please set AAX_SDK_ROOT.")
endif ()
endif ()

#====================================================================
# Add Sub Directories
#====================================================================
add_subdirectory(common)
message(STATUS "ECLIPSA_PLUGIN_FORMATS = ${ECLIPSA_PLUGIN_FORMATS}")
add_subdirectory(rendererplugin)
add_subdirectory(audioelementplugin)

#====================================================================
# Dependency List
#====================================================================
if (NOT DEFINED ECLIPSA_PLATFORM_LIBS)
message(WARNING "ECLIPSA_PLATFORM_LIBS not set—are you using a platform toolchain?")
set(ECLIPSA_PLATFORM_LIBS "")
endif ()

add_library(eclipsa_dependencies INTERFACE)

target_link_libraries(eclipsa_dependencies INTERFACE
# Vendored shared libs
vendored_gpac
vendored_iamf_tools
libzmq

# Static libs from third_party
saf
Libear
LUFSMeter
spatialaudiolib
${IAMF_LIB_NAME}

# Platform-specific (from toolchain)
${ECLIPSA_PLATFORM_LIBS}
)

#====================================================================
# Testing #2
#====================================================================
if (CI_TEST OR INTERNAL_TEST)
eclipsa_build_tests()
endif()
endif ()
Loading