cmake: pyside2 config fix

This commit is contained in:
looooo
2019-09-27 11:44:16 +02:00
committed by wmayer
parent 4ffe076544
commit 03a17b1564

View File

@@ -43,11 +43,17 @@ macro(SetupShibokenAndPyside)
endif()
endif()
if(NOT SHIBOKEN_INCLUDE_DIR)
# pyside2 changed it's cmake files, this is the dance we have
# to dance to be compatible with the old (<5.12) and the new versions (>=5.12)
if(NOT SHIBOKEN_LIBRARY AND TARGET Shiboken2::libshiboken)
get_property(SHIBOKEN_LIBRARY TARGET Shiboken2::libshiboken PROPERTY IMPORTED_LOCATION_RELEASE)
endif(NOT SHIBOKEN_LIBRARY AND TARGET Shiboken2::libshiboken)
if(NOT SHIBOKEN_LIBRARY)
message("====================\n"
"shiboken2 not found.\n"
"====================\n")
endif(NOT SHIBOKEN_INCLUDE_DIR)
endif(NOT SHIBOKEN_LIBRARY)
find_package(PySide2 QUIET)# REQUIRED
if(NOT PYSIDE_INCLUDE_DIR)