Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.4.0
-
None
Description
After building the project from the git sources for MSVC, the release version can be used in cmake projects as expected, the debug version complains about the IMPORTED_IMPLIB and IMPORTED_LOCATION target properties not being set:
... 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_IMPLIB not set for imported target "Qt6::Core" configuration 1> [CMake] "Debug". 1> [CMake] 1> [CMake] 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_IMPLIB not set for imported target "Qt6::Gui" configuration 1> [CMake] "Debug". 1> [CMake] 1> [CMake] 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_IMPLIB not set for imported target "Qt6::Core" configuration 1> [CMake] "Release". 1> [CMake] 1> [CMake] 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_IMPLIB not set for imported target "Qt6::Gui" configuration 1> [CMake] "Release". 1> [CMake] 1> [CMake] 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_IMPLIB not set for imported target "Qt6::Core" configuration 1> [CMake] "MinSizeRel". 1> [CMake] 1> [CMake] 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_IMPLIB not set for imported target "Qt6::Gui" configuration 1> [CMake] "MinSizeRel". 1> [CMake] 1> [CMake] 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_IMPLIB not set for imported target "Qt6::Core" configuration 1> [CMake] "RelWithDebInfo". 1> [CMake] 1> [CMake] 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_IMPLIB not set for imported target "Qt6::Gui" configuration 1> [CMake] "RelWithDebInfo". 1> [CMake] 1> [CMake] 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_LOCATION not set for imported target "Qt6::Core" configuration 1> [CMake] "Debug". 1> [CMake] 1> [CMake] 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_LOCATION not set for imported target "Qt6::Core" configuration 1> [CMake] "Release". 1> [CMake] 1> [CMake] 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_LOCATION not set for imported target "Qt6::Core" configuration 1> [CMake] "MinSizeRel". 1> [CMake] 1> [CMake] 1> [CMake] CMake Error in D:\path\to\my\CMakeLists.txt: 1> [CMake] IMPORTED_LOCATION not set for imported target "Qt6::Core" configuration 1> [CMake] "RelWithDebInfo".
The notable difference in the CMake directories that seem to be relevant is the lack of a per-configuration export script being installed:
release-install-prefix\lib\cmake\Qt6Core\Qt6CoreTargets-release.cmake is present
debug-install-prefix\lib\cmake\Qt6Core\Qt6CoreTargets-debug.cmake is missing though. (install_manifest.txt s are attached)
The build was done from the same sources, but using different build/install directories
CMake Version 3.22
Visual Studio Community 17.2.5
Ninja 1.10.2
The build was configured via
../qt5/configure.bat <options>
command run from the build directory; for the options, see the attached config.release.opt and config.debug.opt files; those were the files written to as configure.opt to the build directory (note: install manifests paths were replaced; the actual paths did match the ones provided via -prefix option).
Command to build:
cmake --build . --parallel
Command to install:
cmake --install .
Note: at least for one of the builds I needed to repeat the `cmake --build .` call since an the build aborted because one of the build steps failed; calling the build command again did seem to result in a successful completion of the build process in the end though.
All the steps were run from "x64 Native Tools Command Prompt for VS 2022" without any additional modifications of the environment before the build.