MESSAGE(STATUS "Translation files will be linked using ${bibletime_TRANSLATION_RESOURCE_FILE}")

SET(QRC_FILE "${CMAKE_CURRENT_SOURCE_DIR}/i18n/messages/${bibletime_TRANSLATION_RESOURCE_FILE}")
SET(QRC_COPIED_FILE "${CMAKE_CURRENT_BINARY_DIR}/${bibletime_TRANSLATION_RESOURCE_FILE}")
SET(QRC_CPP_FILE "${CMAKE_CURRENT_BINARY_DIR}/translate_qrc.cpp")

SET(TS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/i18n/messages)

BT_GET_TRANSLATION_FILELISTS(${TS_DIR} ${bibletime_TRANSLATION_FILE_PREFIX} TS_FILES QM_FILES)

BT_CREATE_QM_FILES("${TS_FILES}" "${QM_FILES}" "${bibletime_LINK_TRANSLATION_FILES}")

BT_COPY_QRC_TO_BUILD_DIR(${QRC_FILE} ${QRC_COPIED_FILE})

BT_RUN_RESOURCE_COMPILER("${QM_FILES}" ${QRC_COPIED_FILE} ${QRC_CPP_FILE})


# compile and link translations into the bibletime executable
SET(common_bibletime_SOURCES
    ${common_bibletime_SOURCES}
    ${QRC_CPP_FILE}
)
