Remove *.qm files from targets when built-in translations enabled

This prevents updating *.ts files twice and in parallel leading to
build errors.
experiment/srcref_basic_cfg v4.11.0
Martchus 5 years ago
parent 924481b033
commit a7880e3d0c
  1. 5
      cmake/modules/AppTarget.cmake
  2. 5
      cmake/modules/LibraryTarget.cmake

@ -34,7 +34,10 @@ else()
endif()
# define relevant files
set(ALL_FILES ${HEADER_FILES} ${SRC_FILES} ${GENERATED_DBUS_FILES} ${WIDGETS_FILES} ${QML_FILES} ${RES_FILES} ${QM_FILES} ${WINDOWS_ICON_PATH})
set(ALL_FILES ${HEADER_FILES} ${SRC_FILES} ${GENERATED_DBUS_FILES} ${WIDGETS_FILES} ${QML_FILES} ${RES_FILES} ${WINDOWS_ICON_PATH})
if(NOT BUILTIN_TRANSLATIONS)
list(APPEND ALL_FILES ${QM_FILES})
endif()
# add target for building the application
add_executable(${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX} ${GUI_TYPE} ${ALL_FILES})

@ -99,7 +99,10 @@ endif()
message(STATUS "${TARGET_PREFIX}${META_PROJECT_NAME}${TARGET_SUFFIX}: BUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}")
# define relevant files
set(ALL_FILES ${HEADER_FILES} ${SRC_FILES} ${GENERATED_DBUS_FILES} ${WIDGETS_FILES} ${QML_FILES} ${RES_FILES} ${QM_FILES} ${WINDOWS_ICON_PATH})
set(ALL_FILES ${HEADER_FILES} ${SRC_FILES} ${GENERATED_DBUS_FILES} ${WIDGETS_FILES} ${QML_FILES} ${RES_FILES} ${WINDOWS_ICON_PATH})
if(NOT BUILTIN_TRANSLATIONS)
list(APPEND ALL_FILES ${QM_FILES})
endif()
# add target for building the library
if(BUILD_SHARED_LIBS)

Loading…
Cancel
Save