1 # This file is part of LyX, the document processor.
2 # Licence details can be found in the file COPYING.
4 # Copyright (c) 2012 Kornel Benko kornel@lyx.org
7 # LYX_ROOT = ${TOP_SRC_DIR}/lib/doc
9 # format = lyx16x|xhtml
10 # extension = 16.lyx|xhtml
13 # Script should be called like:
14 # cmake -DLYX_ROOT=xxx \
19 # -P "${TOP_SRC_DIR}/development/autotests/export.cmake"
22 message(STATUS "Executing ${lyx} -E ${format} ${file}.${extension} ${LYX_ROOT}/${file}.lyx")
23 execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${file}.${extension})
25 COMMAND ${lyx} -E ${format} ${file}.${extension} "${LYX_ROOT}/${file}.lyx"
27 string(COMPARE NOTEQUAL ${_err} 0 _erg)
29 message(STATUS "Exporting ${f}.lyx to ${format}")
30 message(FATAL_ERROR "Export failed")