[CMake] byte-compiling emacs lisp sources

Tim Blechmann tim at klingt.org
Sat Feb 13 07:05:19 EST 2010


hi all,

i've got some troubles to byte-compile emacs lisp files with cmake.

basically, i need to do the following
- copy source file to the build directory
- compile the elc file with: "emacs -batch -f batch-byte-compile 
/path/to/source.el"
- add an install rule to install the generated elc file to 
"share/emacs/site-lisp"



currently, i am using this snippet:
configure_file(${el}
               ${CMAKE_CURRENT_BINARY_DIR}/${el})

add_custom_command(TARGET ${el}c
                  COMMAND emacs -batch -f batch-byte-compile 
${CMAKE_CURRENT_BINARY_DIR}/${el}
                  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${el})

install(TARGETS ${el}c
        DESTINATION "share/emacs/site-lisp")

however, neither the byte-code target is generated, nor the does the install 
statement want to install the target (since it is not an executable, library 
or module)

what am i doing wrong? or is there a module for building emacs byte-code 
files?

thanks in advance, tim

-- 
tim at klingt.org
http://tim.klingt.org

Which is more musical, a truck passing by a factory or a truck passing
by a music school?
  John Cage




More information about the CMake mailing list