cMake: ensure the Shiboken target exists before using it

This commit is contained in:
Chris Hennes
2024-08-04 22:11:18 -05:00
parent e4da596ac5
commit 1f67a96a66

View File

@@ -38,7 +38,7 @@ macro(SetupShibokenAndPyside)
find_package(Shiboken${SHIBOKEN_MAJOR_VERSION} QUIET)
endif()
if(SHIBOKEN_MAJOR_VERSION EQUAL 6)
if(TARGET Shiboken6::libshiboken AND SHIBOKEN_MAJOR_VERSION EQUAL 6)
set_target_properties(Shiboken6::libshiboken PROPERTIES INTERFACE_COMPILE_DEFINITIONS "NDEBUG")
endif()
endif()