Problem building pyside-setup pyside component, lots of CMake Errors: get_target_property() called with non-existent target "Qt6::XXXPrivate"
Solved
Qt for Python
-
Could someone give me a few pointers on how to fix the build errors?
Build output here (First CMake Error is on line 942)
Environment:
- Windows 11
- Python 3.13.2
- CMake 3.30.5-msvc23
- Initialized environment with
.../vcvarsall.bat x64
- pyside-setup 0d82fb7c with following changes:
-
In
build_scripts/utils.py
run_process
, show command output:-kwargs = {} -kwargs['env'] = initial_env - -exit_code = subprocess.call(args, **kwargs) +exit_code = subprocess.run(args, stdout=sys.stdout, stderr=sys.stderr, env=initial_env).returncode return exit_code
-
In
sources/pyside6/cmake/PySideSetup.cmake
, avoid using_message
as it seems to be causing CMake to exit with non-zero code:# Override message not to display info messages when doing a quiet build. +# ^ Note: The above comment likely meant "NOTICE messages" +# (or "DEPRECATION messages") instead. +# There is no "info" level in CMake message(). if(QUIET_BUILD AND is_pyside6_superproject_build) - function(message) - list(GET ARGV 0 MessageType) - if(MessageType STREQUAL FATAL_ERROR OR - MessageType STREQUAL SEND_ERROR OR - MessageType STREQUAL WARNING OR - MessageType STREQUAL AUTHOR_WARNING) - list(REMOVE_AT ARGV 0) - _message(${MessageType} "${ARGV}") - endif() - endfunction() + set(CMAKE_MESSAGE_LOG_LEVEL AUTHOR_WARNING) endif()
-
Same in
sources/shiboken6/cmake/ShibokenHelpers.cmake
:# Override message not to display info messages when doing a quiet build. - function(message) - list(GET ARGV 0 MessageType) - if (MessageType STREQUAL FATAL_ERROR OR - MessageType STREQUAL SEND_ERROR OR - MessageType STREQUAL WARNING OR - MessageType STREQUAL AUTHOR_WARNING) - list(REMOVE_AT ARGV 0) - _message(${MessageType} "${ARGV}") + # ^ Note: The above comment likely meant "NOTICE messages" + # (or "DEPRECATION messages") instead. + # There is no "info" level in CMake message(). + if(QUIET_BUILD AND is_pyside6_superproject_build) + set(CMAKE_MESSAGE_LOG_LEVEL AUTHOR_WARNING) endif() - endfunction()
-
- qtbase built and installed
- prebuilt clang v20.1.1 x64 installed
Command:
python setup.py build --build-tests
-