6a117a9ba9
Implements the full encoding pipeline for Expert Sleepers ES-5 with ESX-8GT (gate) and ESX-8CV (CV) expanders as a native CLAP plugin. Encoder logic ported from Expert Sleepers' MIT-licensed Pure Data externals (https://github.com/expertsleepersltd/externals). - ES-5 encoder: packs 6 × 8-bit header values into stereo 24-bit audio - ESX-8GT encoder: 8 boolean gates → 1 byte - ESX-8CV encoder: 8 × 12-bit CV values via 64-phase state machine - 54 automatable parameters (6 header types + 48 gate/CV values) - State save/load for preset support - Builds on Linux (tested), macOS, and Windows
60 lines
1.6 KiB
CMake
60 lines
1.6 KiB
CMake
cmake_minimum_required(VERSION 3.17)
|
|
project(es5-clap VERSION 0.1.0 LANGUAGES CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
|
|
include(FetchContent)
|
|
|
|
FetchContent_Declare(
|
|
clap
|
|
GIT_REPOSITORY https://github.com/free-audio/clap.git
|
|
GIT_TAG 1.2.7
|
|
)
|
|
FetchContent_MakeAvailable(clap)
|
|
|
|
FetchContent_Declare(
|
|
clap-helpers
|
|
GIT_REPOSITORY https://github.com/free-audio/clap-helpers.git
|
|
GIT_TAG main
|
|
)
|
|
FetchContent_MakeAvailable(clap-helpers)
|
|
|
|
add_library(${PROJECT_NAME} MODULE
|
|
src/plugin.cpp
|
|
src/entry.cpp
|
|
)
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE clap-helpers)
|
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
|
PREFIX ""
|
|
SUFFIX ".clap"
|
|
)
|
|
target_link_options(${PROJECT_NAME} PRIVATE
|
|
-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/linux-es5-clap.version
|
|
-Wl,-z,defs
|
|
)
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
|
BUNDLE TRUE
|
|
BUNDLE_EXTENSION clap
|
|
MACOSX_BUNDLE_GUI_IDENTIFIER at.sub-net.es5-clap
|
|
MACOSX_BUNDLE_BUNDLE_NAME "ES-5 Encoder"
|
|
MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}"
|
|
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}"
|
|
)
|
|
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|
set_target_properties(${PROJECT_NAME} PROPERTIES
|
|
PREFIX ""
|
|
SUFFIX ".clap"
|
|
)
|
|
endif()
|
|
|
|
# Install to standard CLAP paths
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
install(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/clap)
|
|
endif()
|