Skip to content

Commit fcf7c6d

Browse files
committed
Tau - add handy cmake build file for sp_midi and sp_link
This is provided to make it easier to build the NIFs just when working on Tau and not part of the larger Sonic Pi code base.
1 parent 14c0f3b commit fcf7c6d

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

app/server/beam/tau/CMakeLists.txt

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This CMakeLists builds all the external libraries required for a Tau.
2+
3+
# This is provided for the convinience of devs just wanting to work on Tau
4+
# directly without building the full GUI.
5+
6+
# For the full Sonic Pi build, use the scripts in /app to not just build the
7+
# extensions referenced here but also other extensions required by the GUI.
8+
9+
cmake_minimum_required(VERSION 3.13)
10+
11+
message(STATUS "External NIF Builder")
12+
13+
project(ExternalsBuilder)
14+
15+
option(USE_SYSTEM_LIBS "Use system libraries instead of bundled libraries when building" OFF)
16+
17+
message(STATUS "USE_SYSTEM_LIBS: ${USE_SYSTEM_LIBS}")
18+
19+
include(GNUInstallDirs)
20+
include(ExternalProject)
21+
22+
set(CMAKE_OSX_DEPLOYMENT_TARGET '10.15')
23+
24+
# sp_midi
25+
ExternalProject_Add(sp_midi
26+
PREFIX sp_midi-prefix
27+
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../external/sp_midi
28+
INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/priv
29+
CMAKE_ARGS
30+
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/priv
31+
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
32+
-DUSE_SYSTEM_RTMIDI=${USE_SYSTEM_LIBS}
33+
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config Release
34+
)
35+
36+
ExternalProject_Add(sp_link
37+
PREFIX sp_link-prefix
38+
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../external/sp_link
39+
INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/priv
40+
CMAKE_ARGS
41+
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_SOURCE_DIR}/priv
42+
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}
43+
BUILD_COMMAND ${CMAKE_COMMAND} --build . --config Release
44+
)

0 commit comments

Comments
 (0)