mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-11-05 01:23:24 -08:00
[Build] Use versionless Qt CMake commands (#7639)
* [Build] Use versionless Qt CMake commands Replace the versioned qt6_add_executable, qt6_add_resources, qt6_add_shaders,\nqt6_add_translations and qt6_wrap_cpp calls with their unversioned forms.\nAll five are documented as available at the project's 6.4 minimum and accept\nthe same arguments.\n\nVerification: full client, Oracle, server and test build passed. * versionless qt_finalize_target and _project --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de> Co-authored-by: tooomm <tooomm@users.noreply.github.com>
This commit is contained in:
parent
d4002dc52b
commit
ae43659b91
4 changed files with 14 additions and 14 deletions
|
|
@ -462,5 +462,5 @@ endif()
|
|||
|
||||
if(Qt6_FOUND AND Qt6_VERSION_MINOR GREATER_EQUAL 3)
|
||||
# Qt6.3+ requires project finalization to support translations
|
||||
qt6_finalize_project()
|
||||
qt_finalize_project()
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -490,7 +490,7 @@ if(APPLE)
|
|||
set(cockatrice_SOURCES ${cockatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
||||
endif(APPLE)
|
||||
|
||||
qt6_add_resources(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
|
||||
qt_add_resources(cockatrice_RESOURCES_RCC ${cockatrice_RESOURCES})
|
||||
|
||||
# Declare path variables
|
||||
set(ICONDIR
|
||||
|
|
@ -511,7 +511,7 @@ set(COCKATRICE_MAC_QM_INSTALL_DIR "cockatrice.app/Contents/Resources/translation
|
|||
set(COCKATRICE_UNIX_QM_INSTALL_DIR "share/cockatrice/translations")
|
||||
set(COCKATRICE_WIN32_QM_INSTALL_DIR "translations")
|
||||
|
||||
qt6_add_executable(
|
||||
qt_add_executable(
|
||||
cockatrice
|
||||
WIN32
|
||||
MACOSX_BUNDLE
|
||||
|
|
@ -523,7 +523,7 @@ qt6_add_executable(
|
|||
|
||||
target_precompile_headers(cockatrice PRIVATE "${CMAKE_SOURCE_DIR}/cmake/pch/qtwidgets_pch.h")
|
||||
|
||||
qt6_add_shaders(
|
||||
qt_add_shaders(
|
||||
cockatrice
|
||||
"onboarding_shaders"
|
||||
PREFIX
|
||||
|
|
@ -535,7 +535,7 @@ qt6_add_shaders(
|
|||
src/interface/widgets/onboarding/shaders/brand_plate.frag
|
||||
)
|
||||
|
||||
qt6_add_resources(
|
||||
qt_add_resources(
|
||||
cockatrice
|
||||
"onboarding_qml"
|
||||
PREFIX
|
||||
|
|
@ -768,7 +768,7 @@ endif()
|
|||
if(Qt6LinguistTools_FOUND)
|
||||
#Qt6 Translations happen after the executable is built up
|
||||
if(UPDATE_TRANSLATIONS)
|
||||
qt6_add_translations(
|
||||
qt_add_translations(
|
||||
cockatrice
|
||||
TS_FILES
|
||||
${cockatrice_TS}
|
||||
|
|
@ -778,7 +778,7 @@ if(Qt6LinguistTools_FOUND)
|
|||
cockatrice_QM
|
||||
)
|
||||
else()
|
||||
qt6_add_translations(cockatrice TS_FILES ${cockatrice_TS} QM_FILES_OUTPUT_VARIABLE cockatrice_QM)
|
||||
qt_add_translations(cockatrice TS_FILES ${cockatrice_TS} QM_FILES_OUTPUT_VARIABLE cockatrice_QM)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
|
|
@ -804,4 +804,4 @@ if(Qt6LinguistTools_FOUND)
|
|||
endforeach()
|
||||
endif()
|
||||
|
||||
qt6_finalize_target(cockatrice)
|
||||
qt_finalize_target(cockatrice)
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ set(oracle_RESOURCES oracle.qrc)
|
|||
# ------------------------
|
||||
# Qt resources
|
||||
# ------------------------
|
||||
qt6_add_resources(oracle_RESOURCES_RCC ${oracle_RESOURCES})
|
||||
qt_add_resources(oracle_RESOURCES_RCC ${oracle_RESOURCES})
|
||||
|
||||
# ------------------------
|
||||
# Include directories
|
||||
|
|
@ -108,7 +108,7 @@ set(ORACLE_UNIX_QM_INSTALL_DIR "share/oracle/translations")
|
|||
set(ORACLE_WIN32_QM_INSTALL_DIR "translations")
|
||||
|
||||
# Qt6 Translations are linked after the executable is created in manual mode
|
||||
qt6_add_executable(
|
||||
qt_add_executable(
|
||||
oracle
|
||||
WIN32
|
||||
MACOSX_BUNDLE
|
||||
|
|
@ -283,7 +283,7 @@ endif()
|
|||
if(Qt6LinguistTools_FOUND)
|
||||
#Qt6 Translations happen after the executable is built up
|
||||
if(UPDATE_TRANSLATIONS)
|
||||
qt6_add_translations(
|
||||
qt_add_translations(
|
||||
oracle
|
||||
TS_FILES
|
||||
${oracle_TS}
|
||||
|
|
@ -293,7 +293,7 @@ if(Qt6LinguistTools_FOUND)
|
|||
oracle_QM
|
||||
)
|
||||
else()
|
||||
qt6_add_translations(oracle TS_FILES ${oracle_TS} QM_FILES_OUTPUT_VARIABLE oracle_QM)
|
||||
qt_add_translations(oracle TS_FILES ${oracle_TS} QM_FILES_OUTPUT_VARIABLE oracle_QM)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
|
|
@ -319,4 +319,4 @@ if(Qt6LinguistTools_FOUND)
|
|||
endforeach()
|
||||
endif()
|
||||
|
||||
qt6_finalize_target(oracle)
|
||||
qt_finalize_target(oracle)
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ if(APPLE)
|
|||
set(servatrice_SOURCES ${servatrice_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/resources/appicon.icns)
|
||||
endif(APPLE)
|
||||
|
||||
qt6_add_resources(servatrice_RESOURCES_RCC ${servatrice_RESOURCES})
|
||||
qt_add_resources(servatrice_RESOURCES_RCC ${servatrice_RESOURCES})
|
||||
|
||||
set(QT_DONT_USE_QTGUI TRUE)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue