Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.3.1
-
None
-
-
2f7a78cd7b (qt/qtbase/dev) 2f7a78cd7b (qt/tqtc-qtbase/dev) 35a47549d2 (qt/qtbase/6.3) 35a47549d2 (qt/tqtc-qtbase/6.3)
Description
Modify the wiggly example's CMakeLists.txt to look like this:
cmake_minimum_required(VERSION 3.16) project(wiggly LANGUAGES CXX) set(CMAKE_INSTALL_BINDIR ".") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) qt_standard_project_setup() qt_add_executable(wiggly dialog.cpp dialog.h main.cpp wigglywidget.cpp wigglywidget.h ) set_target_properties(wiggly PROPERTIES WIN32_EXECUTABLE TRUE MACOSX_BUNDLE TRUE ) target_link_libraries(wiggly PUBLIC Qt::Widgets ) install(TARGETS wiggly RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" BUNDLE DESTINATION . ) qt_generate_deploy_app_script( TARGET wiggly FILENAME_VARIABLE deploy_script ) install(SCRIPT ${deploy_script})
This will create a qt.conf next to wiggly.exe with the following content:
[Paths] Prefix = .. Binaries = .
The prefix should be "."
Changing the CMAKE_INSTALL_BINDIR variable to the empty string leads to an error on installation:
... -- Running Qt deploy tool for /wiggly.exe in working directory 'D:/TEMP/wiggly' 'D:/dev/qt/dev-x86_64/qtbase/bin/windeployqt.exe' '/wiggly.exe' '--dir' '.' '--libdir' '--plugindir' 'plugins' '--force' "\wiggly.exe" does not exist.
Attachments
For Gerrit Dashboard: QTBUG-105583 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
427220,2 | CMake: Allow for CMAKE_INSTALL_BINDIR set to . in deployment API | dev | qt/qtbase | Status: MERGED | +2 | 0 |
427293,2 | CMake: Allow for CMAKE_INSTALL_BINDIR set to . in deployment API | 6.4 | qt/qtbase | Status: MERGED | +2 | 0 |
427294,2 | CMake: Allow for CMAKE_INSTALL_BINDIR set to . in deployment API | 6.3 | qt/qtbase | Status: MERGED | +2 | 0 |