a7c3d94e4c
Please visit the submodule repo for blame history: https://github.com/obsproject/obs-vst This also replaces the obs-vst .clang-format with obs-studio's. This commit depends on the previous commit, which removes the submodule separately as Git complains otherwise. Co-authored-by: Alex Anderson <anderson.john.alexander@gmail.com> Co-authored-by: Anton <camotank12345@gmail.com> Co-authored-by: Blue Cat Audio <support@bluecataudio.com> Co-authored-by: Cephas Reis <c3r1c3@nevermindonline.com> Co-authored-by: Colin Edwards <colin@recursivepenguin.com> Co-authored-by: Florian Zwoch <fzwoch@gmail.com> Co-authored-by: Fogmoon <i@fogmoon.com> Co-authored-by: Gol-D-Ace <Gol-D-Ace@users.noreply.github.com> Co-authored-by: Igor Bochkariov <ujifgc@gmail.com> Co-authored-by: Jesse Chappell <jesse@sonosaurus.com> Co-authored-by: Keen <523059842@qq.com> Co-authored-by: Kurt Kartaltepe <kkartaltepe@gmail.com> Co-authored-by: Matt Gajownik <matt@obsproject.com> Co-authored-by: Matt Gajownik <matt@wizardcm.com> Co-authored-by: Richard Stanway <notr1ch@users.noreply.github.com> Co-authored-by: Ryan Foster <RytoEX@gmail.com> Co-authored-by: follower <github@rancidbacon.com> Co-authored-by: gxalpha <beckmann.sebastian@outlook.de> Co-authored-by: jp9000 <obs.jim@gmail.com> Co-authored-by: jpark37 <jpark37@users.noreply.github.com> Co-authored-by: mntone <sd8@live.jp> Co-authored-by: tytan652 <tytan652@tytanium.xyz> Co-authored-by: wangshaohui <97082645@qq.com> Co-authored-by: wangshaohui <wang.shaohui@navercorp.com>
89 lines
2.4 KiB
CMake
89 lines
2.4 KiB
CMake
project(obs-vst)
|
|
|
|
option(ENABLE_VST "Enable building OBS with VST plugin" ON)
|
|
|
|
if(NOT ENABLE_VST)
|
|
message(STATUS "OBS: DISABLED obs-vst")
|
|
return()
|
|
endif()
|
|
|
|
option(ENABLE_VST_BUNDLED_HEADERS "Build with Bundled Headers" ON)
|
|
mark_as_advanced(ENABLE_VST_BUNDLED_HEADERS)
|
|
|
|
add_library(obs-vst MODULE)
|
|
add_library(OBS::vst ALIAS obs-vst)
|
|
|
|
find_qt(COMPONENTS Widgets)
|
|
|
|
set_target_properties(
|
|
obs-vst
|
|
PROPERTIES AUTOMOC ON
|
|
AUTOUIC ON
|
|
AUTORCC ON)
|
|
|
|
target_include_directories(
|
|
obs-vst PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
target_sources(
|
|
obs-vst
|
|
PRIVATE obs-vst.cpp VSTPlugin.cpp EditorWidget.cpp
|
|
headers/vst-plugin-callbacks.hpp headers/EditorWidget.h
|
|
headers/VSTPlugin.h)
|
|
|
|
target_link_libraries(obs-vst PRIVATE OBS::libobs Qt::Widgets)
|
|
|
|
target_include_directories(
|
|
obs-vst PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/headers)
|
|
|
|
target_compile_features(obs-vst PRIVATE cxx_std_17)
|
|
|
|
if(ENABLE_VST_BUNDLED_HEADERS)
|
|
message(STATUS "OBS: - obs-vst uses bundled VST headers")
|
|
|
|
target_sources(obs-vst PRIVATE vst_header/aeffectx.h)
|
|
|
|
target_include_directories(obs-vst
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/vst_header)
|
|
else()
|
|
set(VST_INCLUDE_DIR
|
|
""
|
|
CACHE PATH
|
|
"Path to Steinburg headers (e.g. C:/VST3 SDK/pluginterfaces/vst2.x)"
|
|
FORCE)
|
|
mark_as_advanced(VST_INCLUDE_DIR)
|
|
|
|
message(
|
|
WARNING
|
|
"OBS: You should only use the Steinburg headers for debugging or local builds. "
|
|
"It is illegal to distribute the Steinburg headers with anything, and "
|
|
"possibly against the GPL to distribute the binaries from the resultant compile."
|
|
)
|
|
|
|
target_sources(obs-vst PRIVATE ${VST_INCLUDE_DIR}/aeffectx.h)
|
|
endif()
|
|
|
|
if(OS_MACOS)
|
|
find_library(FOUNDATION Foundation)
|
|
find_library(COCOA Cocoa)
|
|
mark_as_advanced(COCOA FOUNDATION)
|
|
|
|
target_sources(obs-vst PRIVATE mac/VSTPlugin-osx.mm mac/EditorWidget-osx.mm)
|
|
|
|
target_link_libraries(obs-vst PRIVATE ${COCOA} ${FOUNDATION})
|
|
|
|
elseif(OS_WINDOWS)
|
|
target_sources(obs-vst PRIVATE win/VSTPlugin-win.cpp win/EditorWidget-win.cpp)
|
|
|
|
target_compile_definitions(obs-vst PRIVATE UNICODE _UNICODE)
|
|
|
|
elseif(OS_POSIX)
|
|
target_sources(obs-vst PRIVATE linux/VSTPlugin-linux.cpp
|
|
linux/EditorWidget-linux.cpp)
|
|
|
|
endif()
|
|
|
|
set_target_properties(obs-vst PROPERTIES FOLDER "plugins" PREFIX "")
|
|
|
|
setup_plugin_target(obs-vst)
|