Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.2.0 Beta3
-
None
-
7be143f43849dc9a6917d4165a7ec459f53983b8
Description
Configure qt5.git with
./../worktrees/dev/configure -- -DQT_BUILD_SUBMODULES="qtsvg"
Make sure you don't have any Preload.cmake file or anything else that would set an explicit prefix or enable developer-build feature (non-prefix build).
Upon the end of configuration, you get the following output
Once everything is built, you must run 'cmake --install .'
If you reconfigure with same args in the same folder again a second time, you get
Once everything is built, Qt is installed. You should NOT run 'cmake --install .'
The build turns into a non-prefix build, as evidenced by checking that QT_WILL_INSTALL is set to OFF in CMakeCache.txt.
The symptomatic flip is observed in the second cmake call, but the reason is in the first call.
With --trace-redirect --trace-expand at the first configure call, one can see that when QtBuildInternalsExtra.cmake is loaded during qtsvg configuration, CMAKE_INSTALL_PREFIX is reset from /usr/local to the qtbase build folder.
/Users/alex/Dev/cmake/Modules/CMakeGenericSystem.cmake(169): set(CMAKE_INSTALL_PREFIX /usr/local CACHE PATH Install path prefix, prepended onto install directories. ) .... /Volumes/T3/Dev/qt/qt5_cmake/worktrees/dev/qtbase/cmake/QtSetup.cmake(83): set(CMAKE_INSTALL_PREFIX /usr/local/Qt-6.2.0 CACHE PATH Install path prefix, prepended onto install directories. FORCE ) .... /Volumes/T3/Dev/qt/qt5_cmake/builds/dev-mac-super-reconfigure/qtbase/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake(37): set(CMAKE_INSTALL_PREFIX /Volumes/T3/Dev/qt/qt5_cmake/builds/dev-mac-super-reconfigure/qtbase CACHE PATH Install path prefix, prepended onto install directories. FORCE )
This only happens in a top-level build with more than 1 repo.
Doesn't seem to happen if an explicit -prefix or CMAKE_INSTALL_PREFIX is passed when configuring, but not sure, maybe it's just not observable in the output and something might still go wrong.
Attachments
Issue Links
- duplicates
-
QTBUG-98087 top-level in-source build detected as prefix build pointing to build dir and removes moc upon install
- Closed
- relates to
-
QTBUG-103759 FEATURE_no_prefix reset to OFF on toplevel build
- Closed