Merge pull request #808 from jpcima/vst3core

Organizational changes around vst3-core
This commit is contained in:
JP Cimalando 2021-04-10 01:51:19 +02:00 committed by GitHub
commit 9ada0be6d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 81 additions and 82 deletions

View file

@ -45,7 +45,7 @@ else()
target_link_libraries(plugins-common PRIVATE ${GLIB_LIBRARIES})
endif()
if((SFIZZ_LV2 AND SFIZZ_LV2_UI) OR SFIZZ_VST)
if((SFIZZ_LV2 AND SFIZZ_LV2_UI) OR SFIZZ_VST OR SFIZZ_AU OR SFIZZ_VST2)
add_subdirectory(editor)
endif()
@ -53,10 +53,6 @@ if(SFIZZ_LV2)
add_subdirectory(lv2)
endif()
if(SFIZZ_VST)
if(SFIZZ_VST OR SFIZZ_AU OR SFIZZ_VST2)
add_subdirectory(vst)
else()
if(SFIZZ_AU)
message(WARNING "Audio Unit requires VST to be enabled")
endif()
endif()

View file

@ -1,6 +1,3 @@
set(VSTPLUGIN_PRJ_NAME "${PROJECT_NAME}_vst3")
set(VSTPLUGIN_BUNDLE_NAME "${PROJECT_NAME}.vst3")
set(VST3SDK_BASEDIR "${CMAKE_CURRENT_SOURCE_DIR}/external/VST_SDK/VST3_SDK")
#set(AUWRAPPER_BASEDIR "${VST3SDK_BASEDIR}/public.sdk/source/vst/auwrapper")
set(AUWRAPPER_BASEDIR "${CMAKE_CURRENT_SOURCE_DIR}/external/sfzt_auwrapper")
@ -17,15 +14,15 @@ include("cmake/Vst3.cmake")
set(RINGBUFFER_HEADERS
"external/ring_buffer/ring_buffer/ring_buffer.h"
"external/ring_buffer/ring_buffer/ring_buffer.tcc")
add_library(sfizz-ring-buffer STATIC
add_library(sfizz-ring-buffer STATIC EXCLUDE_FROM_ALL
"external/ring_buffer/ring_buffer/ring_buffer.cpp"
${RINGBUFFER_HEADERS})
source_group("Header Files" FILES ${RINGBUFFER_HEADERS})
target_include_directories(sfizz-ring-buffer INTERFACE "external/ring_buffer")
target_include_directories(sfizz-ring-buffer PUBLIC "external/ring_buffer")
add_library(sfizz::ring-buffer ALIAS sfizz-ring-buffer)
# Build the VST shared code
add_library(sfizz-vst3-core STATIC
add_library(sfizz-vst3-core STATIC EXCLUDE_FROM_ALL
SfizzVstProcessor.cpp
SfizzVstProcessor.h
SfizzVstController.cpp
@ -60,7 +57,12 @@ gw_target_warn(sfizz-vst3-core PRIVATE
"-Wno-unused-parameter")
add_library(sfizz::vst3-core ALIAS sfizz-vst3-core)
# Build the plugin
# --- VST3 plugin --- #
if(SFIZZ_VST)
set(VSTPLUGIN_PRJ_NAME "${PROJECT_NAME}_vst3")
set(VSTPLUGIN_BUNDLE_NAME "${PROJECT_NAME}.vst3")
add_library(${VSTPLUGIN_PRJ_NAME} MODULE "VstPluginFactory.cpp")
if(WIN32)
target_sources(${VSTPLUGIN_PRJ_NAME} PRIVATE vst3.def)
@ -137,6 +139,7 @@ if(NOT MSVC)
"${VSTPLUGIN_INSTALL_DIR}/${VSTPLUGIN_BUNDLE_NAME}/Contents/MacOS/sfizz"
COMPONENT "vst")
endif()
endif()
# --- Audio Unit wrapper --- #