This repository has been archived by the owner on Oct 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
70 lines (51 loc) · 1.48 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
project(HoaLibrary-SuperCollider)
cmake_minimum_required(VERSION 3.0)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(SC_PLUGINS_PATH /usr/local/share/SuperCollider/Extensions
CACHE PATH "SuperCollider plugins path"
)
else(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(SC_PLUGINS_PATH ~/Library/Application\ Support/SuperCollider/Extensions
CACHE PATH "SuperCollider plugins path"
)
endif()
set(SC_PATH ~/git/supercollider/
CACHE PATH "SuperCollider sdk path"
)
set(HOA_PATH ThirdParty/HoaLibrary-Light
CACHE PATH "HoaLibrary path"
)
FILE(GLOB SC_CLASS src/sc/Classes/*)
set(LIBRARY HoaLibrary)
include_directories(
${HOA_PATH}/Sources
${SC_PATH}/include/common
${SC_PATH}/include/plugin_interface
${SC_PATH}/external_libraries/libsndfile/
)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(CMAKE_SHARED_MODULE_PREFIX "")
if(APPLE OR WIN32)
set(CMAKE_SHARED_MODULE_SUFFIX ".scx")
endif()
add_library(Encoder MODULE
src/Encoder.cpp
)
add_library(Decoder MODULE
src/Decoder.cpp
)
add_library(Optim MODULE
src/Optim.cpp
)
set_property(TARGET Encoder Decoder Optim PROPERTY CXX_STANDARD 11)
target_compile_options(Encoder PUBLIC -O3)
target_compile_options(Decoder PUBLIC -O3)
target_compile_options(Optim PUBLIC -O3)
install(
TARGETS Encoder Decoder Optim
LIBRARY DESTINATION ${SC_PLUGINS_PATH}/${LIBRARY}
)
install(
FILES ${SC_CLASS}
DESTINATION ${SC_PLUGINS_PATH}/${LIBRARY}/Classes
)