Skip to content

Commit

Permalink
Fix build with Qt 6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
complexlogic committed Jul 27, 2024
1 parent 92398b5 commit e9c9cc9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ permissions:
statuses: read

env:
VCPKG_COMMITTISH: 53bef8994c541b6561884a8395ea35715ece75db
VCPKG_COMMITTISH: 1de2026f28ead93ff1773e6e680387643e914ea1

jobs:
build_windows:
Expand Down
15 changes: 9 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ list(LENGTH LANGS NB_LANGS)
string(REPLACE ";" "" LANG_PAIRS ${LANGS})
configure_file("${PROJECT_SOURCE_DIR}/translations/languages.hpp.in" "${PROJECT_BINARY_DIR}/languages.hpp")

# Make lupdate target for Qt 6
if (${QT_VERSION} VERSION_GREATER_EQUAL "6")
qt_add_lupdate(${EXECUTABLE_NAME}
TS_FILES ${TS_FILES} "${PROJECT_SOURCE_DIR}/translations/source.ts"
)
endif ()
qt_add_translation(QM_FILES "${TS_FILES}")
foreach (FILE ${QM_FILES})
get_filename_component(BASENAME ${FILE} NAME)
Expand Down Expand Up @@ -213,3 +207,12 @@ elseif (WIN32)
endif ()
include(CPack)
endif ()

# Make lupdate target for Qt 6
if (${Qt${QT_VERSION}_VERSION} VERSION_GREATER_EQUAL 6.7)
qt_add_lupdate(
TS_FILES ${TS_FILES} "${PROJECT_SOURCE_DIR}/translations/source.ts"
SOURCE_TARGETS "${EXECUTABLE_NAME}"
LUPDATE_TARGET "update_translations"
)
endif ()

0 comments on commit e9c9cc9

Please sign in to comment.