-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
49 lines (42 loc) · 1.38 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
cmake_minimum_required(VERSION 3.8)
project(RnboSaw)
set(CMAKE_CXX_STANDARD 11)
set(SC_PATH "${CMAKE_CURRENT_LIST_DIR}/third-party/supercollider")
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
include_directories(${CMAKE_CURRENT_LIST_DIR}/src)
include_directories(${CMAKE_CURRENT_LIST_DIR}/rnbo-export/rnbo)
include_directories(${CMAKE_CURRENT_LIST_DIR}/rnbo-export/rnbo/common)
include_directories(${CMAKE_CURRENT_LIST_DIR}/rnbo-export/rnbo/src)
include_directories(${SC_PATH}/include/plugin_interface)
include_directories(${SC_PATH}/include/common)
set(BUILD_SOURCES
${CMAKE_CURRENT_LIST_DIR}/rnbo-export/rnbo_source.cpp
${CMAKE_CURRENT_LIST_DIR}/rnbo-export/rnbo/RNBO.cpp
${CMAKE_CURRENT_LIST_DIR}/src/RnboSaw.cpp
)
set(CMAKE_SHARED_MODULE_PREFIX "")
if(APPLE OR WIN32)
set(CMAKE_SHARED_MODULE_SUFFIX ".scx")
endif()
add_library(RnboSaw MODULE
${BUILD_SOURCES}
)
if (APPLE)
set(INSTALL_BASE "$ENV{HOME}/Library/Application Support/SuperCollider/Extensions/")
elseif (UNIX)
set(INSTALL_BASE "$ENV{HOME}/.local/share/SuperCollider/Extensions/")
endif()
if (INSTALL_BASE)
install(
FILES ${CMAKE_CURRENT_LIST_DIR}/src/RnboSaw.sc
DESTINATION ${INSTALL_BASE}/classes/
)
install(
FILES ${CMAKE_CURRENT_LIST_DIR}/src/RnboSaw.schelp
DESTINATION ${INSTALL_BASE}/HelpSource/Classes/
)
install(
TARGETS RnboSaw
DESTINATION ${INSTALL_BASE}/plugins/
)
endif()