Don't create convenience plugin target when not needed
If the OUTPUT_NAME of a plugin is the same as the CMake target name,
don't try to create a custom target with the same name. That will
cause configuration errors due to duplicate targets.
Amends f67d8ae2d4
Change-Id: Iaea7c68e22dbc1e345ba10950c312618abba4c21
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
bb10
parent
a3ff42ade6
commit
fd590b9482
|
|
@ -2215,7 +2215,7 @@ function(qt_add_plugin target)
|
|||
set_property(TARGET "${target}" PROPERTY OUTPUT_NAME "${output_name}")
|
||||
|
||||
# Add a custom target with the Qt5 qmake name for a more user friendly ninja experience.
|
||||
if(arg_OUTPUT_NAME)
|
||||
if(arg_OUTPUT_NAME AND NOT TARGET "${output_name}")
|
||||
add_custom_target("${output_name}")
|
||||
add_dependencies("${output_name}" "${target}")
|
||||
endif()
|
||||
|
|
|
|||
Loading…
Reference in New Issue