1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fixes for compilation with Qt6

This commit is contained in:
Ivan Savenko 2023-01-17 12:49:33 +02:00
parent b9712b0899
commit 7a92aa0a06
2 changed files with 4 additions and 0 deletions

View File

@ -91,6 +91,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
if(TARGET Qt6::Core)
qt_wrap_ui(launcher_UI_HEADERS ${launcher_FORMS})
if(ENABLE_TRANSLATIONS)
set_source_files_properties(${launcher_TS} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/translation)
# TODO: consider using qt_add_translations: https://doc.qt.io/qt-6/qtlinguist-cmake-qt-add-translations.html
qt_add_translation( launcher_QM ${launcher_TS} )
endif()
else()

View File

@ -93,6 +93,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
if(TARGET Qt6::Core)
qt_wrap_ui(editor_UI_HEADERS ${editor_FORMS})
if(ENABLE_TRANSLATIONS)
set_source_files_properties(${editor_TS} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/translation)
# TODO: consider using qt_add_translations: https://doc.qt.io/qt-6/qtlinguist-cmake-qt-add-translations.html
qt_add_translation( editor_QM ${editor_TS} )
endif()
else()