Querying qmake for QT_INSTALL_TRANSLATIONS returns a path containing the base triplet (e.g. x64-osx) instead of the precise one (e.g. x64-osx-release).
This issue may be be macOS-specific because I didn't encounter it on Windows.
Environment
OS: macOS
Compiler: 14.0.3 (clang-1403.0.22.14.1)
To Reproduce
Steps to reproduce the behavior:
./vcpkg install qtbase:x64-osx-release
Query qmake for QT_INSTALL_TRANSLATIONS, example CMake code:
# Get the path to the qmake executable
get_target_property(QT_QMAKE_EXECUTABLE Qt6::qmake IMPORTED_LOCATION)
# Query qmake for the location of the installed Qt translations
execute_process(
COMMAND ${QT_QMAKE_EXECUTABLE} -query QT_INSTALL_TRANSLATIONS
OUTPUT_VARIABLE QUERY_RESULT
)
string(STRIP "${QUERY_RESULT}" QUERY_RESULT)
message(STATUS "${QUERY_RESULT}")
Observe the resulting value (path) containing x64-osx rather than x64-osx-release.
Expected behavior
The variable should point to the correct directory that contains Qt's translations.
Failure logs
-- Qt6 component found: LinguistTools | Version: 6.7.2
-- Bundling Qt translations from "/Users/runner/hostedtoolcache/MumbleBuild/mumble_env.x64-osx-release.2024-08-15.9ad0398d8/installed/x64-osx/translations/Qt6"
-- Found Python interpreter version 3.11.8
Traceback (most recent call last):
File "/Users/runner/work/1/s/scripts/generate-mumble_qt-qrc.py", line 145, in <module>
main()
File "/Users/runner/work/1/s/scripts/generate-mumble_qt-qrc.py", line 137, in main
processedComponents.extend(dirToQrc(of, dirName, processedComponents))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/runner/work/1/s/scripts/generate-mumble_qt-qrc.py", line 78, in dirToQrc
fileNames = os.listdir(absPath)
^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/runner/hostedtoolcache/MumbleBuild/mumble_env.x64-osx-release.2024-08-15.9ad0398d8/installed/x64-osx/translations/Qt6'
CMake Error at cmake/qt-utils.cmake:150 (message):
generate-mumble_qt-qrc.py returned exit code 1
Call Stack (most recent call first):
src/mumble/CMakeLists.txt:845 (bundle_qt_translations)
Describe the bug
Querying qmake for
QT_INSTALL_TRANSLATIONS
returns a path containing the base triplet (e.g.x64-osx
) instead of the precise one (e.g.x64-osx-release
).This issue may be be macOS-specific because I didn't encounter it on Windows.
Environment
To Reproduce
Steps to reproduce the behavior:
./vcpkg install qtbase:x64-osx-release
Query qmake for
QT_INSTALL_TRANSLATIONS
, example CMake code:x64-osx
rather thanx64-osx-release
.Expected behavior
The variable should point to the correct directory that contains Qt's translations.
Failure logs