basic cmake-based build system:
this patch implements a cmake-based build system for supercollider. it currently builds: - sclang and scsynth on linux - plugins on linux and osx - scel Signed-off-by: Tim Blechmann <tim@klingt.org> git-svn-id: https://supercollider.svn.sourceforge.net/svnroot/supercollider/trunk@10240 a380766d-ff14-0410-b294-a243070f3f08
This commit is contained in:
parent
f2476c981c
commit
3c21a65e4c
3 changed files with 50 additions and 0 deletions
2
CMakeLists.txt
Normal file
2
CMakeLists.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
add_subdirectory(el)
|
||||||
|
add_subdirectory(sc)
|
42
el/CMakeLists.txt
Normal file
42
el/CMakeLists.txt
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
find_program(EMACS_EXECUTABLE emacs)
|
||||||
|
if(NOT EMACS_EXECUTABLE)
|
||||||
|
message(SEND_ERROR "Emacs could not be found")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(GLOB scel_sources
|
||||||
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.el)
|
||||||
|
|
||||||
|
set(PKG_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/SuperCollider)
|
||||||
|
|
||||||
|
configure_file(sclang-vars.el.in
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/sclang-vars.el)
|
||||||
|
|
||||||
|
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/sclang-vars.elc
|
||||||
|
COMMAND ${EMACS_EXECUTABLE} -batch -f batch-byte-compile
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/sclang-vars.el
|
||||||
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/sclang-vars.el
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMENT "Creating byte-compiled Emacs lisp ${CMAKE_CURRENT_BINARY_DIR}/sclang-vars.elc")
|
||||||
|
|
||||||
|
add_custom_target(sclang-vars.elc ALL
|
||||||
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/sclang-vars.elc)
|
||||||
|
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sclang-vars.elc
|
||||||
|
DESTINATION share/emacs/site-lisp)
|
||||||
|
|
||||||
|
|
||||||
|
foreach (el ${scel_sources})
|
||||||
|
configure_file(${el} ${CMAKE_CURRENT_BINARY_DIR}/${el})
|
||||||
|
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${el}c
|
||||||
|
COMMAND ${EMACS_EXECUTABLE} -batch -f batch-byte-compile
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/${el}
|
||||||
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${el}
|
||||||
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
COMMENT "Creating byte-compiled Emacs lisp ${CMAKE_CURRENT_BINARY_DIR}/${el}c")
|
||||||
|
|
||||||
|
add_custom_target(${el}c ALL
|
||||||
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${el}c)
|
||||||
|
|
||||||
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${el}c
|
||||||
|
DESTINATION share/emacs/site-lisp)
|
||||||
|
endforeach()
|
6
sc/CMakeLists.txt
Normal file
6
sc/CMakeLists.txt
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
file(GLOB scel_sources
|
||||||
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.sc)
|
||||||
|
|
||||||
|
|
||||||
|
install(FILES ${scel_sources}
|
||||||
|
DESTINATION share/SuperCollider/Extensions/scide_scel)
|
Loading…
Reference in a new issue