forked from martineastwood/mverb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
102 lines (89 loc) · 2.89 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Copyright (c) 2022 Arne Scheffler
# This code is distributed under the terms of the GNU General Public License
#
# MVerb is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# at your option) any later version.
#
# MVerb is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this MVerb. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required(VERSION 3.14.0)
set(CMAKE_OSX_DEPLOYMENT_TARGET CACHE STRING 10.14)
set(vst3sdk_SOURCE_DIR CACHE PATH ../vst3sdk/)
if(NOT vst3sdk_SOURCE_DIR)
message(FATAL_ERROR "Path to VST3 SDK is empty! Invoke cmake with -Dvst3sdk_SOURCE_DIR=PATH_TO_VST3_SDK.")
endif()
if(NOT IS_DIRECTORY ${vst3sdk_SOURCE_DIR})
message(FATAL_ERROR "Path to VST3 SDK is not a directory!")
endif()
project(MVerb
VERSION 1.0.0.0
DESCRIPTION "MVerb VST 3 Plug-in"
)
set(SMTG_VSTGUI_ROOT "${vst3sdk_SOURCE_DIR}")
add_subdirectory(${vst3sdk_SOURCE_DIR} ${PROJECT_BINARY_DIR}/vst3sdk)
smtg_enable_vst3_sdk()
smtg_add_vst3plugin(MVerb
source/vst3/version.h
source/vst3/cids.h
source/vst3/processor.h
source/vst3/processor.cpp
source/vst3/controller.h
source/vst3/controller.cpp
source/vst3/entry.cpp
source/vst3/shared.h
source/MVerb.h
)
#- VSTGUI Wanted ----
if(SMTG_ADD_VSTGUI)
target_sources(MVerb
PRIVATE
resource/editor.uidesc
)
target_link_libraries(MVerb
PRIVATE
vstgui_support
)
smtg_target_add_plugin_resources(MVerb
RESOURCES
"resource/editor.uidesc"
)
endif(SMTG_ADD_VSTGUI)
# -------------------
smtg_target_add_plugin_snapshots (MVerb
RESOURCES
resource/B2D18CA401105C1AB7F76B14FEE77D9C_snapshot.png
resource/B2D18CA401105C1AB7F76B14FEE77D9C_snapshot_2.0x.png
)
target_link_libraries(MVerb
PRIVATE
sdk
)
smtg_target_configure_version_file(MVerb)
if(SMTG_MAC)
smtg_target_set_bundle(MVerb
BUNDLE_IDENTIFIER com.martineastwood.MVerb.vst3
COMPANY_NAME ""
)
smtg_target_set_debug_executable(MVerb
"/Applications/VST3PluginTestHost.app"
"--pluginfolder;$(BUILT_PRODUCTS_DIR)"
)
elseif(SMTG_WIN)
target_sources(MVerb PRIVATE
resource/win32resource.rc
)
if(MSVC)
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT MVerb)
smtg_target_set_debug_executable(MVerb
"$(ProgramW6432)/Steinberg/VST3PluginTestHost/VST3PluginTestHost.exe"
"--pluginfolder \"$(OutDir)/\""
)
endif()
endif(SMTG_MAC)