Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Make deprecated VSTs an opt-in #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ endif()

set(VSTSDK3_DIR "./Vst3.x/" CACHE PATH "VSTSDK location")

option(BUILD_DEPRECATED "Build deprecated VSTs" OFF)
if(BUILD_DEPRECATED)
add_compile_definitions(BUILD_DEPRECATED)
endif()

# shared code
add_subdirectory(WaveSabreCore)
add_subdirectory(WaveSabrePlayerLib)
Expand Down
5 changes: 5 additions & 0 deletions Vsts/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
set(VSTDIR "" CACHE PATH "VST system directory")

file(GLOB children RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*)

if(NOT BUILD_DEPRECATED)
list(REMOVE_ITEM children "Thunder")
endif()

foreach(child ${children})
if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${child})
file(GLOB sources ${CMAKE_CURRENT_SOURCE_DIR}/${child}/*.h)
Expand Down
12 changes: 9 additions & 3 deletions WaveSabreCore/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_library(WaveSabreCore
set(WaveSabreCore_SOURCES
include/WaveSabreCore/Adultery.h
include/WaveSabreCore/AllPass.h
include/WaveSabreCore/AllPassDelay.h
Expand All @@ -24,7 +24,6 @@ add_library(WaveSabreCore
include/WaveSabreCore/Specimen.h
include/WaveSabreCore/StateVariableFilter.h
include/WaveSabreCore/SynthDevice.h
include/WaveSabreCore/Thunder.h
include/WaveSabreCore/Twister.h
src/Adultery.cpp
src/AllPass.cpp
Expand All @@ -51,9 +50,16 @@ add_library(WaveSabreCore
src/Specimen.cpp
src/StateVariableFilter.cpp
src/SynthDevice.cpp
src/Thunder.cpp
src/Twister.cpp)

if(BUILD_DEPRECATED)
list(APPEND WaveSabreCore_SOURCES
include/WaveSabreCore/Thunder.h
src/Thunder.cpp)
endif()

add_library(WaveSabreCore ${WaveSabreCore_SOURCES})

target_link_libraries(WaveSabreCore Msacm32.lib)
target_include_directories(WaveSabreCore PUBLIC include)

Expand Down
2 changes: 2 additions & 0 deletions WaveSabrePlayerLib/include/WaveSabrePlayerLib/SongRenderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ namespace WaveSabrePlayerLib
{
Falcon,
Slaughter,
#ifdef BUILD_DEPRECATED
Thunder,
#endif
Scissor,
Leveller,
Crusher,
Expand Down
2 changes: 2 additions & 0 deletions WaveSabreStandAlonePlayer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ WaveSabreCore::Device *SongFactory(SongRenderer::DeviceId id)
{
case SongRenderer::DeviceId::Falcon: return new WaveSabreCore::Falcon();
case SongRenderer::DeviceId::Slaughter: return new WaveSabreCore::Slaughter();
#ifdef BUILD_DEPRECATED
case SongRenderer::DeviceId::Thunder: return new WaveSabreCore::Thunder();
#endif
case SongRenderer::DeviceId::Scissor: return new WaveSabreCore::Scissor();
case SongRenderer::DeviceId::Leveller: return new WaveSabreCore::Leveller();
case SongRenderer::DeviceId::Crusher: return new WaveSabreCore::Crusher();
Expand Down