Details
-
Bug
-
Resolution: Incomplete
-
P2: Important
-
None
-
6.7.0
-
None
-
-
9a66527fe (6.7)
Description
qt_add_translations CFBundleLocalizations seems to be broken for macOS:
project(myproj) ... add_executable(mytarget ...) qt_add_translations(mytarget SOURCE_TARGETS mytarget TS_FILES myproj_en.ts myproj_nl.ts )
Gives:
CMake Warning at /Users/sander/.conan2/p/b/qt0a87ba8b93b86/p/lib/cmake/Qt6LinguistTools/Qt6LinguistToolsMacros.cmake:399 (message): Failed to resolve language code for myproj_en.ts. Please update CFBundleLocalizations in your Info.plist manually. Call Stack (most recent call first): /Users/xxx/.conan2/p/b/qt0a87ba8b93b86/p/lib/cmake/Qt6LinguistTools/Qt6LinguistToolsMacros.cmake:718 (_qt_internal_store_languages_from_ts_files_in_targets) /Users/xxx/.conan2/p/b/qt0a87ba8b93b86/p/lib/cmake/Qt6LinguistTools/Qt6LinguistToolsMacros.cmake:799 (qt6_add_translations) cpp/pep/assessor/CMakeLists.txt:110 (qt_add_translations)
For some reason, it does work when prefixing the TS paths with ${CMAKE_CURRENT_SOURCE_DIR}.