mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Cmake build: Don't try to convert non-lyx-files.
Since they are not supposed to contain versioned strings like LYX_DIR_VER, it is sufficient to copy them instead. Besides, they also may be non-utf-8 coded, which would also break the conversion.
This commit is contained in:
parent
4c49463c61
commit
1844d22221
@ -29,20 +29,29 @@ foreach(_rel_doc ${_rel_lyx_docs})
|
||||
#message(STATUS "output ${_created_doc}")
|
||||
#message(STATUS "rel_dir_part ${_rel_dir_part}")
|
||||
SET_SOURCE_FILES_PROPERTIES(${_created_doc} GENERATED)
|
||||
add_custom_command(
|
||||
OUTPUT "${_created_doc}"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE}
|
||||
-DTOP_CMAKE_PATH=${TOP_CMAKE_PATH}
|
||||
-DLYX_USERDIR_VER=${LYX_USERDIR_VER}
|
||||
-DLYX_DIR_VER=${LYX_DIR_VER}
|
||||
-DTOP_SRC_DIR=${TOP_SRC_DIR}
|
||||
-DREL_DIR=${_rel_dir_part}
|
||||
-DSOURCE=${_rel_doc}
|
||||
-DCREATED=${_created_doc}
|
||||
-P "${TOP_CMAKE_PATH}/doc/ReplaceValues.cmake"
|
||||
DEPENDS "${TOP_SRC_DIR}/lib/doc/${_rel_doc}" "${TOP_CMAKE_PATH}/doc/ReplaceValues.py"
|
||||
if ("${_rel_doc}" MATCHES ".lyx$")
|
||||
add_custom_command(
|
||||
OUTPUT "${_created_doc}"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-DLYX_PYTHON_EXECUTABLE=${LYX_PYTHON_EXECUTABLE}
|
||||
-DTOP_CMAKE_PATH=${TOP_CMAKE_PATH}
|
||||
-DLYX_USERDIR_VER=${LYX_USERDIR_VER}
|
||||
-DLYX_DIR_VER=${LYX_DIR_VER}
|
||||
-DTOP_SRC_DIR=${TOP_SRC_DIR}
|
||||
-DREL_DIR=${_rel_dir_part}
|
||||
-DSOURCE=${_rel_doc}
|
||||
-DCREATED=${_created_doc}
|
||||
-P "${TOP_CMAKE_PATH}/doc/ReplaceValues.cmake"
|
||||
DEPENDS "${TOP_SRC_DIR}/lib/doc/${_rel_doc}" "${TOP_CMAKE_PATH}/doc/ReplaceValues.py"
|
||||
)
|
||||
else()
|
||||
# Copy only
|
||||
add_custom_command(
|
||||
OUTPUT "${_created_doc}"
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
-E copy_if_different "${TOP_SRC_DIR}/lib/doc/${_rel_doc}" "${_created_doc}"
|
||||
)
|
||||
endif()
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${_rel_doc}" DESTINATION "${LYX_DATA_SUBDIR}doc/${_rel_dir_part}")
|
||||
LIST(APPEND _docs "${_created_doc}")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user