From 0985d6a202f60711aa73c9df917fa64704cf6ee9 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Tue, 16 Nov 2010 16:04:49 +0100 Subject: [PATCH] cmake build system: copy all *el files to build directory this ensures a correct elisp bytecode compilation Signed-off-by: Tim Blechmann --- el/CMakeLists.txt | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/el/CMakeLists.txt b/el/CMakeLists.txt index c069fdf..63bedaf 100644 --- a/el/CMakeLists.txt +++ b/el/CMakeLists.txt @@ -11,24 +11,16 @@ 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}) +endforeach() + +set(all_scel_sources ${scel_sources} sclang-vars.el) + +foreach (el ${all_scel_sources}) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${el}c COMMAND ${EMACS_EXECUTABLE} -batch - --eval \"(add-to-list 'load-path (expand-file-name \\\"${CMAKE_CURRENT_SOURCE_DIR}\\\"))\" + --eval \"(add-to-list 'load-path (expand-file-name \\\"${CMAKE_CURRENT_BINARY_DIR}\\\")) \" -f batch-byte-compile ${CMAKE_CURRENT_BINARY_DIR}/${el} DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${el}