forked from dsp56300/gearmulator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
103 lines (81 loc) · 3.42 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
103
cmake_minimum_required(VERSION 3.15)
# build a fat binary that runs on both intel and the new Apple M1 chip
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64")
#set(CMAKE_OSX_ARCHITECTURES "x86_64")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "Minimum OS X deployment version")
project(gearmulator VERSION 1.2.5)
include(base.cmake)
set(ASMJIT_STATIC TRUE)
option(${PROJECT_NAME}_BUILD_JUCEPLUGIN "Build Juce plugin" on)
add_subdirectory(source/dsp56300/source)
add_subdirectory(source/synthLib)
add_subdirectory(source/virusLib)
add_subdirectory(source/libresample)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/source/vstsdk2.4.2/public.sdk/source/vst2.x/audioeffect.h)
set(JUCE_GLOBAL_VST2_SDK_PATH ${CMAKE_CURRENT_SOURCE_DIR}/source/vstsdk2.4.2/)
endif()
# ----------------- Juce based audio plugin
set_property(GLOBAL PROPERTY USE_FOLDERS YES)
if(${PROJECT_NAME}_BUILD_JUCEPLUGIN)
set(JUCE_ENABLE_MODULE_SOURCE_GROUPS ON CACHE BOOL "" FORCE)
add_subdirectory(source/JUCE)
add_subdirectory(source/jucePlugin)
if(MSVC OR APPLE)
if(JUCE_GLOBAL_VST2_SDK_PATH)
install(TARGETS jucePlugin_VST DESTINATION . COMPONENT VST2)
endif()
install(TARGETS jucePlugin_VST3 DESTINATION . COMPONENT VST3)
if(APPLE)
install(TARGETS jucePlugin_AU DESTINATION . COMPONENT AU)
endif()
elseif(UNIX)
if(JUCE_GLOBAL_VST2_SDK_PATH)
install(TARGETS jucePlugin_VST LIBRARY DESTINATION /usr/local/lib/lxvst/ COMPONENT VST2)
endif()
install(TARGETS jucePlugin_VST3 LIBRARY DESTINATION /usr/local/lib/vst3/ COMPONENT VST3)
endif()
if(MSVC OR APPLE)
if(JUCE_GLOBAL_VST2_SDK_PATH)
install(TARGETS jucePlugin_Dark_VST DESTINATION . COMPONENT VST2_Dark)
endif()
install(TARGETS jucePlugin_Dark_VST3 DESTINATION . COMPONENT VST3_Dark)
if(APPLE)
install(TARGETS jucePlugin_Dark_AU DESTINATION . COMPONENT AU_Dark)
endif()
elseif(UNIX)
if(JUCE_GLOBAL_VST2_SDK_PATH)
install(TARGETS jucePlugin_Dark_VST LIBRARY DESTINATION /usr/local/lib/lxvst/ COMPONENT VST2_Dark)
endif()
install(TARGETS jucePlugin_Dark_VST3 LIBRARY DESTINATION /usr/local/lib/vst3/ COMPONENT VST3_Dark)
endif()
endif()
# ----------------- Test Console
add_executable(virusTestConsole)
target_sources(virusTestConsole PRIVATE source/virusTestConsole/virusTestConsole.cpp)
target_link_libraries(virusTestConsole PUBLIC virusLib)
if(UNIX AND NOT APPLE)
target_link_libraries(virusTestConsole PUBLIC -static-libgcc -static-libstdc++)
endif()
install(TARGETS virusTestConsole DESTINATION . COMPONENT testConsole)
if(MSVC)
install(DIRECTORY deploy/win/ DESTINATION . COMPONENT testConsole)
else()
install(DIRECTORY deploy/linux/ DESTINATION . COMPONENT testConsole)
endif()
# ----------------- CPack
set(CPACK_COMPONENTS_ALL VST2 VST3 AU VST2_Dark VST3_Dark AU_Dark testConsole)
set(CPACK_COMPONENTS_GROUPING IGNORE)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_PACKAGE_CONTACT "The Usual Suspects")
set(CPACK_PACKAGE_VENDOR "The Usual Suspects")
set(CPACK_PACKAGE_NAME "DSP56300Emu")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "DSP 56300 family emulator audio plugin")
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "The Usual Suspects")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://dsp56300.wordpress.com")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_RPM_COMPONENT_INSTALL ON)
set(CPACK_RPM_PACKAGE_AUTOREQ "yes")
set(CPACK_RPM_PACKAGE_URL ${CPACK_DEBIAN_PACKAGE_HOMEPAGE})
set(CPACK_RPM_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION_SUMMARY})
include(CPack)