|
| 1 | +cmake_minimum_required(VERSION 3.14.0) |
| 2 | +set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13 CACHE STRING "") |
| 3 | + |
| 4 | +set(vst3sdk_SOURCE_DIR "${VST3_SDK_ROOT}") |
| 5 | +if(NOT vst3sdk_SOURCE_DIR) |
| 6 | + message(FATAL_ERROR "Path to VST3 SDK is empty!") |
| 7 | +endif() |
| 8 | + |
| 9 | +project(DCOffsetter |
| 10 | + # This is your plug-in version number. Change it here only. |
| 11 | + # Version number symbols usable in C++ can be found in |
| 12 | + # source/version.h and ${PROJECT_BINARY_DIR}/projectversion.h. |
| 13 | + VERSION 1.0.0.0 |
| 14 | + DESCRIPTION "DCOffsetter VST 3 Plug-in" |
| 15 | +) |
| 16 | + |
| 17 | +set(SMTG_VSTGUI_ROOT "${vst3sdk_SOURCE_DIR}") |
| 18 | + |
| 19 | +add_subdirectory(${vst3sdk_SOURCE_DIR} ${PROJECT_BINARY_DIR}/vst3sdk) |
| 20 | +smtg_enable_vst3_sdk() |
| 21 | + |
| 22 | +smtg_add_vst3plugin(DCOffsetter |
| 23 | + source/version.h |
| 24 | + source/myplugincids.h |
| 25 | + source/mypluginprocessor.h |
| 26 | + source/mypluginprocessor.cpp |
| 27 | + source/myplugincontroller.h |
| 28 | + source/myplugincontroller.cpp |
| 29 | + source/mypluginentry.cpp |
| 30 | +) |
| 31 | + |
| 32 | +#- VSTGUI Wanted ---- |
| 33 | +if(SMTG_ADD_VSTGUI) |
| 34 | + target_sources(DCOffsetter |
| 35 | + PRIVATE |
| 36 | + resource/myplugineditor.uidesc |
| 37 | + ) |
| 38 | + target_link_libraries(DCOffsetter |
| 39 | + PRIVATE |
| 40 | + vstgui_support |
| 41 | + ) |
| 42 | + smtg_target_add_plugin_resources(DCOffsetter |
| 43 | + RESOURCES |
| 44 | + resource/myplugineditor.uidesc |
| 45 | + resource/logo.png |
| 46 | + resource/slider_handle.png |
| 47 | + resource/slider_rail.png |
| 48 | + resource/slider_scale.png |
| 49 | + resource/toggle_small.png |
| 50 | + ) |
| 51 | +endif(SMTG_ADD_VSTGUI) |
| 52 | +# ------------------- |
| 53 | + |
| 54 | +smtg_target_add_plugin_snapshots (DCOffsetter |
| 55 | + RESOURCES |
| 56 | + resource/54B41A6759565BB18EEEE67E16FEA83D_snapshot.png |
| 57 | + resource/54B41A6759565BB18EEEE67E16FEA83D_snapshot_2.0x.png |
| 58 | +) |
| 59 | + |
| 60 | +target_link_libraries(DCOffsetter |
| 61 | + PRIVATE |
| 62 | + sdk |
| 63 | +) |
| 64 | + |
| 65 | +smtg_target_configure_version_file(DCOffsetter) |
| 66 | + |
| 67 | +if(SMTG_MAC) |
| 68 | + smtg_target_set_bundle(DCOffsetter |
| 69 | + BUNDLE_IDENTIFIER com.jonas.dcoffsetter |
| 70 | + COMPANY_NAME "Jonas M" |
| 71 | + ) |
| 72 | + smtg_target_set_debug_executable(DCOffsetter |
| 73 | + "/Applications/VST3PluginTestHost.app" |
| 74 | + "--pluginfolder;$(BUILT_PRODUCTS_DIR)" |
| 75 | + ) |
| 76 | +elseif(SMTG_WIN) |
| 77 | + target_sources(DCOffsetter PRIVATE |
| 78 | + resource/win32resource.rc |
| 79 | + ) |
| 80 | + if(MSVC) |
| 81 | + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT DCOffsetter) |
| 82 | + |
| 83 | + smtg_target_set_debug_executable(DCOffsetter |
| 84 | + "$(ProgramW6432)/Steinberg/VST3PluginTestHost/VST3PluginTestHost.exe" |
| 85 | + "--pluginfolder \"$(OutDir)/\"" |
| 86 | + ) |
| 87 | + endif() |
| 88 | +endif(SMTG_MAC) |
0 commit comments