-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
96 lines (78 loc) · 3.47 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
####################################################################################################
# CMakeLists file for DBAP
# Generated by Jacob Sundstrom
# 2020-08-21
####################################################################################################
####################################################################################################
# basic project config
cmake_minimum_required(VERSION 3.5)
set(project_name "DBAP")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_modules ${CMAKE_MODULE_PATH})
set(CMAKE_CXX_STANDARD 11)
####################################################################################################
# load modules
include(SuperColliderServerPlugin RESULT_VARIABLE server_plugin_found)
if(NOT server_plugin_found)
message(FATAL_ERROR "Could not find server plugin functions module")
endif()
include(SuperColliderCompilerConfig RESULT_VARIABLE compiler_config_found)
if(NOT compiler_config_found)
message(FATAL_ERROR "Could not find compiler config module")
endif()
# Windows - puts redistributable DLLs in install directory
include(InstallRequiredSystemLibraries)
sc_check_sc_path("${SC_PATH}")
message(STATUS "Found SuperCollider: ${SC_PATH}")
set(SC_PATH "${SC_PATH}" CACHE PATH
"Path to SuperCollider source. Relative paths are treated as relative to this script" FORCE)
include("${SC_PATH}/SCVersion.txt")
message(STATUS "Building plugins for SuperCollider version: ${SC_VERSION}")
# set project here to avoid SCVersion.txt clobbering our version info
project(${project_name})
sc_do_initial_compiler_config() # do after setting project so compiler ID is available
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT OR NOT CMAKE_INSTALL_PREFIX)
message(WARNING "No install prefix provided, defaulting to $BUILD_DIR/install")
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "Install prefix" FORCE)
endif()
message(STATUS "Install directory set to: ${CMAKE_INSTALL_PREFIX}")
####################################################################################################
# options
option(SUPERNOVA "Build plugins for supernova" ON)
option(SCSYNTH "Build plugins for scsynth" ON)
option(NATIVE "Optimize for native architecture" OFF)
option(STRICT "Use strict warning flags" OFF)
option(NOVA_SIMD "Build plugins with nova-simd support." ON)
####################################################################################################
# include libraries
if (NOVA_SIMD)
add_definitions(-DNOVA_SIMD)
include_directories(${SC_PATH}/external_libraries/nova-simd)
endif()
####################################################################################################
# Begin target DBAP
set(DBAP_cpp_files
plugins/DBAP/DBAP.cpp
plugins/DBAP/DBAP.hpp
)
set(DBAP_sc_files
plugins/DBAP/array.sc
plugins/DBAP/DBAP.sc
)
set(DBAP_schelp_files
plugins/DBAP/DBAPSpeakerArray.schelp
plugins/DBAP/DBAP.schelp
plugins/DBAP/convexHull.png
)
sc_add_server_plugin(
"DBAP/DBAP" # desination directory
"DBAP" # target name
"${DBAP_cpp_files}"
"${DBAP_sc_files}"
"${DBAP_schelp_files}"
)
# End target DBAP
####################################################################################################
####################################################################################################
# END PLUGIN TARGET DEFINITION
####################################################################################################
message(STATUS "Generating plugin targets done")