90 lines
2.1 KiB
CMake
90 lines
2.1 KiB
CMake
cmake_minimum_required(VERSION 3.28)
|
|
|
|
project(plugins VERSION 1.0.0)
|
|
set(NAME basics)
|
|
|
|
################ boilerplate config
|
|
|
|
set(CMAKE_CXX_STANDARD 17) # for string_view
|
|
|
|
if (APPLE)
|
|
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13)
|
|
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
|
|
enable_language(OBJCXX)
|
|
endif ()
|
|
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
clap
|
|
GIT_REPOSITORY https://github.com/geraintluff/clap.git # https://github.com/free-audio/clap
|
|
GIT_TAG 2df92fe17911f15436176b9c37faec370166d14f # draft/web
|
|
GIT_SHALLOW OFF
|
|
)
|
|
FetchContent_MakeAvailable(clap)
|
|
|
|
################ CLAP wrapper stuff
|
|
|
|
if(NOT DEFINED VST3_SDK_ROOT)
|
|
if(EMSCRIPTEN)
|
|
# don't download the VST3 SDK
|
|
set(VST3_SDK_ROOT "./dummy/vst3sdk/path")
|
|
else()
|
|
set(CLAP_WRAPPER_DOWNLOAD_DEPENDENCIES TRUE)
|
|
endif()
|
|
endif()
|
|
|
|
set(CLAP_WRAPPER_OUTPUT_NAME clap-wrapper-target)
|
|
set(CLAP_WRAPPER_DONT_ADD_TARGETS TRUE)
|
|
|
|
include(FetchContent)
|
|
FetchContent_Declare(
|
|
clap-wrapper
|
|
GIT_REPOSITORY https://github.com/free-audio/clap-wrapper
|
|
GIT_TAG 0.12.1 # first version with WCLAP stuff
|
|
GIT_SHALLOW ON
|
|
)
|
|
FetchContent_MakeAvailable(clap-wrapper)
|
|
|
|
################ Helpers
|
|
|
|
FetchContent_Declare(
|
|
clap-helpers
|
|
GIT_REPOSITORY https://github.com/free-audio/clap-helpers
|
|
GIT_TAG 58ab81b1dc8219e859529c1306f364bb3aedf7d5
|
|
GIT_SHALLOW OFF
|
|
)
|
|
FetchContent_MakeAvailable(clap-helpers)
|
|
|
|
################ The actual plugin(s)
|
|
|
|
add_library(${NAME}_static STATIC)
|
|
target_link_libraries(${NAME}_static PUBLIC
|
|
clap
|
|
clap-helpers
|
|
)
|
|
target_sources(${NAME}_static PUBLIC
|
|
${CMAKE_CURRENT_SOURCE_DIR}/source/${name}.cpp
|
|
)
|
|
|
|
make_clapfirst_plugins(
|
|
TARGET_NAME ${NAME}
|
|
IMPL_TARGET ${NAME}_static
|
|
|
|
RESOURCE_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/resources"
|
|
|
|
OUTPUT_NAME "${NAME}"
|
|
ENTRY_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/source/clap_entry.cpp
|
|
|
|
BUNDLE_IDENTIFIER "uk.co.signalsmith-audio.plugins.${NAME}"
|
|
BUNDLE_VERSION "1.0.0"
|
|
WINDOWS_FOLDER_VST3 TRUE
|
|
|
|
PLUGIN_FORMATS CLAP VST3 WCLAP # AUV2
|
|
COPY_AFTER_BUILD FALSE
|
|
|
|
AUV2_MANUFACTURER_NAME "Signalsmith Audio"
|
|
AUV2_MANUFACTURER_CODE "SigA"
|
|
AUV2_SUBTYPE_CODE "BdDt"
|
|
AUV2_INSTRUMENT_TYPE "aufx"
|
|
)
|