CMake: Fix PySide6 pip search

Since ac77cd779e ("CMake: PySide cleanup") compatibility variables depends
on PySide6_FOUND, but setting that was later removed, leaving pip installed
PySide6 undetected.

Fixes: 9119d392c9 ("CMake: Fix PySide6 search")
This commit is contained in:
Ladislav Michl
2025-03-10 14:15:49 +01:00
parent 844cceb04f
commit f488074088

View File

@@ -5,12 +5,12 @@
find_package(PySide6 CONFIG QUIET) find_package(PySide6 CONFIG QUIET)
if(NOT PySide6_INCLUDE_DIRS AND TARGET PySide6::pyside6) if(NOT PySide6_FOUND)
get_property(PySide6_INCLUDE_DIRS TARGET PySide6::pyside6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES) find_pip_package(PySide6)
endif() endif()
if(NOT PySide6_INCLUDE_DIRS) if(NOT PySide6_INCLUDE_DIRS AND TARGET PySide6::pyside6)
find_pip_package(PySide6) get_property(PySide6_INCLUDE_DIRS TARGET PySide6::pyside6 PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
endif() endif()
# Also provide the old-style variables so we don't have to update everything yet # Also provide the old-style variables so we don't have to update everything yet