-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
82 lines (66 loc) · 2.02 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
project(JustRepeat)
cmake_minimum_required(VERSION 3.0.0)
set(CMAKE_COLOR_MAKEFILE ON)
if(MSVC)
add_definitions(/D _CRT_SECURE_NO_WARNINGS)
endif()
############################
# API fix for Linux builds #
############################
if(UNIX AND NOT APPLE)
add_definitions( -D__cdecl= )
endif()
#################
# Build plug-in #
#################
set(VSTSDK_PATH "${PROJECT_SOURCE_DIR}/../VST_SDK/VST2_SDK")
set(REASDK_PATH "${PROJECT_SOURCE_DIR}/../REA_SDK/jmde")
set(VSTSDK_INCLUDE_DIR ${VSTSDK_PATH})
set(REASDK_INCLUDE_DIR ${REASDK_PATH})
set(VSTSDK_PLUGIN_SOURCE
${VSTSDK_PATH}/public.sdk/source/vst2.x/audioeffectx.cpp
${VSTSDK_PATH}/public.sdk/source/vst2.x/audioeffect.cpp
${VSTSDK_PATH}/public.sdk/source/vst2.x/vstplugmain.cpp
${VSTSDK_PATH}/pluginterfaces/vst2.x/aeffectx.h
)
file(GLOB_RECURSE JUSTREPEAT_SOURCE "src/*.cpp")
set(JUSTREPEAT_SOURCE
${JUSTREPEAT_SOURCE}
resources/vstplug.def
${VSTSDK_PLUGIN_SOURCE}
)
add_library(JustRepeat MODULE ${JUSTREPEAT_SOURCE})
include_directories(src)
include_directories(${VSTSDK_INCLUDE_DIR})
include_directories(${REASDK_INCLUDE_DIR})
target_link_libraries(JustRepeat ${VSTSDK_LIBRARIES})
######################################
# Set OSX-specific bundle properties #
######################################
set_target_properties(JustRepeat PROPERTIES
BUNDLE true
BUNDLE_EXTENSION "vst"
XCODE_ATTRIBUTE_WRAPPER_EXTENSION "vst"
MACOSX_BUNDLE_INFO_PLIST "resources/Info.plist.in"
MACOSX_BUNDLE_BUNDLE_NAME "JustRepeat"
MACOSX_BUNDLE_GUI_IDENTIFIER "com.WrongPeople.JustRepeat"
MACOSX_BUNDLE_ICON_FILE ""
MACOSX_BUNDLE_SHORT_VERSION_STRING "1.0.0"
MACOSX_BUNDLE_COPYRIGHT "WrongPeople © 2020"
)
####################
# Set Install Path #
####################
if(APPLE)
install(TARGETS JustRepeat
DESTINATION "$ENV{HOME}/Library/Audio/Plug-Ins/VST"
)
elseif(WIN32)
install(TARGETS JustRepeat
DESTINATION "/Program Files/VstPlugins/"
)
elseif(UNIX AND NOT APPLE) #Linux
install(TARGETS JustRepeat
DESTINATION "/usr/lib/lxvst"
)
endif()