Browse Source

Fixes for compilation with Qt6

Ivan Savenko 2 years ago
parent
commit
7a92aa0a06
2 changed files with 4 additions and 0 deletions
  1. 2 0
      launcher/CMakeLists.txt
  2. 2 0
      mapeditor/CMakeLists.txt

+ 2 - 0
launcher/CMakeLists.txt

@@ -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()

+ 2 - 0
mapeditor/CMakeLists.txt

@@ -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()