On 24. Sep, 2010, at 14:51 , Laszlo Papp wrote: > This does not generate files. I have got a separate build directory > and doc directory in my project root. The main CMakeLists.txt contains > the doc subdirectory entry. > > set(ASCIIDOC_MANS > hacky.8 > akabei-create-db.8 > akabei.conf.5 > akabei.3 > ) > > find_program(A2X_EXECUTABLE NAMES a2x a2x.py) > set(A2X_OPTS > -D ${CMAKE_BINARY_DIR} > -no-xmllint > -d manpage > -f manpage > --xsltproc-opts='-param man.endnotes.list.enabled 0 -param > man.endnotes.are.numbered 0' > ) > > set(MAN_NAMES ${ASCIIDOC_MANS}) > set(MAN_FILES) > foreach(m IN LISTS MAN_NAMES) > message(STATUS ${CMAKE_BINARY_DIR}/${m}) > set(mf ${CMAKE_BINARY_DIR}/${m}) > set(ms ${CMAKE_SOURCE_DIR}/${m}.txt) > add_custom_command(OUTPUT ${mf} > COMMAND ${A2X_EXECUTABLE} ${A2X_OPTS} ${ms} > DEPENDS ${ms} > WORKING_DIRECTORY ${CMAKE_BINARY_DIR} > COMMENT "Building manpage ${mf}" > VERBATIM) > list(APPEND MAN_FILES ${mf}) > endforeach() > > add_custom_target(man ALL DEPENDS ${MAN_FILES})
If the files are in a sub-directory, use CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR instead. Also, which version of cmake are you using? The foreach(m IN LISTS ...) syntax is new in version 2.8... Michael -- There is always a well-known solution to every human problem -- neat, plausible, and wrong. H. L. Mencken
PGP.sig
Description: This is a digitally signed message part
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake