Make Qt plugin targets optional

This commit is contained in:
Jason Haslam 2020-12-20 20:22:13 -07:00
parent d4788a9ff9
commit ca8c58078c

View File

@ -30,6 +30,10 @@ else()
endif()
foreach(QT_PLUGIN ${QT_PLUGINS})
if(NOT TARGET Qt5::${QT_PLUGIN})
continue()
endif()
get_target_property(PLUGIN Qt5::${QT_PLUGIN} LOCATION_${CMAKE_BUILD_TYPE})
get_filename_component(FILE_NAME ${PLUGIN} NAME)
get_filename_component(DIR ${PLUGIN} DIRECTORY)