Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
5.12.4, 5.12.5, 5.13.1
-
None
-
Windows; vcpkg
Description
relevant vcpkg discussion: https://github.com/microsoft/vcpkg/issues/8180
So vcpkg is calling qt's configure.bat with the following path options
set(BUILD_OPTIONS ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildname}}
-prefix ${CURRENT_INSTALLED_DIR}
-extprefix ${CURRENT_INSTALLED_DIR}
-hostprefix ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}
-hostlibdir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}/lib # could probably be move to manual-link
-hostbindir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}/bin
# Qt VS Plugin requires a /bin subfolder with the executables in the root dir. But to use the wizard a correctly setup lib folder is also required
# So with the vcpkg layout there is no way to make it work unless all dll are are copied to tools/qt5/bin and all libs to tools/qt5/lib
-archdatadir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}
-datadir ${CURRENT_INSTALLED_DIR}${_path_suffix}/share/qt5${_path_suffix_${_buildname}}
-plugindir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/plugins
-qmldir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/qml
-headerdir ${CURRENT_INSTALLED_DIR}/include
-libexecdir ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}
-bindir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/bin
-libdir ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib
-I ${CURRENT_INSTALLED_DIR}/include
-L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib
-L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib/manual-link
-xplatform ${_csc_TARGET_PLATFORM}
)
${CURRENT_INSTALLED_DIR} is some vcpkg path equal for debug and release builds (typically <vcpkgroot>/installed/<triplet>/)
${_path_suffix_${_buildname}} is either empty (release) or /debug (debug)
What we observe is that the variables hardcoded into qmake (output of qmake -query) are totally incorrect for the release build while for debug build they are correct.
Examples (only some variables):
(Release; incorrect)
QT_INSTALL_PREFIX:C:/Dev/BasicTools/vcpkg/installed/x64-windows/tools/qt5/bin QT_INSTALL_BINS:C:/Dev/BasicTools/vcpkg/installed/x64-windows/tools/qt5/bin/bin QT_INSTALL_TRANSLATIONS:C:/Dev/BasicTools/vcpkg/installed/x64-windows/ tools/qt5/bin/translations
(Debug;correct)
QT_INSTALL_PREFIX:C:/Dev/BasicTools/vcpkg/installed/x64-windows/ QT_INSTALL_BINS:C:/Dev/BasicTools/vcpkg/installed/x64-windows/tools/qt5/debug/bin QT_INSTALL_TRANSLATIONS:C:/Dev/BasicTools/vcpkg/installed/x64-windows/share/qt5/debug/translations
(more variables in the vpckg issue link aboved)
I assume the configure/bootstrap step makes wrong assumption in the release case because the directory layout is similar to what Qt normally uses. The installation of qmake itself is done into the correct folder and the generated qt.conf is also containing the correct paths.