Check that shiboken/pyside targets exist

* Some ways of installing pyside provide a cmake script that's broken and
  doesn't produce actual libraries/headers to link against.
This commit is contained in:
baldurk
2020-09-10 11:57:26 +01:00
parent 10a0153511
commit 2eb39ef8fe
+1 -1
View File
@@ -216,7 +216,7 @@ option(QRENDERDOC_ENABLE_PYSIDE2 "Enable PySide2 if found" ON)
if(NOT QRENDERDOC_ENABLE_PYSIDE2)
message(STATUS "PySide2 integration disabled")
elseif(PySide2_FOUND AND Shiboken2_FOUND)
elseif(PySide2_FOUND AND Shiboken2_FOUND AND TARGET Shiboken2::libshiboken AND TARGET PySide2::pyside2)
message(STATUS "Building with PySide2 ${PySide2_VERSION} from ${PySide2_DIR}")
if(NOT PYTHONLIBS_VERSION_STRING MATCHES "${SHIBOKEN_PYTHON_VERSION_MAJOR}.${SHIBOKEN_PYTHON_VERSION_MINOR}")