forked from qt-creator/qt-creator
Revert "Enforce that plugins can't be used as library dependencies"
This reverts commit f5bb913c9d
.
Reason for revert: This breaks snapshots build for the license plugin
Change-Id: I52a9f0b40081d648de68a5bdc3d9b3962e19061a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -129,9 +129,6 @@ function(add_qtc_library name)
|
|||||||
"CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;SYSTEM_INCLUDES;PUBLIC_INCLUDES;PUBLIC_SYSTEM_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PROPERTIES;PRIVATE_COMPILE_OPTIONS;PUBLIC_COMPILE_OPTIONS" ${ARGN}
|
"CONDITION;DEPENDS;PUBLIC_DEPENDS;DEFINES;PUBLIC_DEFINES;INCLUDES;SYSTEM_INCLUDES;PUBLIC_INCLUDES;PUBLIC_SYSTEM_INCLUDES;SOURCES;EXPLICIT_MOC;SKIP_AUTOMOC;EXTRA_TRANSLATIONS;PROPERTIES;PRIVATE_COMPILE_OPTIONS;PUBLIC_COMPILE_OPTIONS" ${ARGN}
|
||||||
)
|
)
|
||||||
|
|
||||||
check_library_dependencies(${_arg_DEPENDS})
|
|
||||||
check_library_dependencies(${_arg_PUBLIC_DEPENDS})
|
|
||||||
|
|
||||||
get_default_defines(default_defines_copy ${_arg_ALLOW_ASCII_CASTS})
|
get_default_defines(default_defines_copy ${_arg_ALLOW_ASCII_CASTS})
|
||||||
|
|
||||||
if (${_arg_UNPARSED_ARGUMENTS})
|
if (${_arg_UNPARSED_ARGUMENTS})
|
||||||
@@ -339,9 +336,6 @@ function(add_qtc_plugin target_name)
|
|||||||
${ARGN}
|
${ARGN}
|
||||||
)
|
)
|
||||||
|
|
||||||
check_library_dependencies(${_arg_DEPENDS})
|
|
||||||
check_library_dependencies(${_arg_PUBLIC_DEPENDS})
|
|
||||||
|
|
||||||
if (${_arg_UNPARSED_ARGUMENTS})
|
if (${_arg_UNPARSED_ARGUMENTS})
|
||||||
message(FATAL_ERROR "add_qtc_plugin had unparsed arguments")
|
message(FATAL_ERROR "add_qtc_plugin had unparsed arguments")
|
||||||
endif()
|
endif()
|
||||||
@@ -621,9 +615,6 @@ function(extend_qtc_plugin target_name)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
check_library_dependencies(${_arg_DEPENDS})
|
|
||||||
check_library_dependencies(${_arg_PUBLIC_DEPENDS})
|
|
||||||
|
|
||||||
extend_qtc_target(${target_name} ${ARGN})
|
extend_qtc_target(${target_name} ${ARGN})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
@@ -633,9 +624,6 @@ function(extend_qtc_library target_name)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
check_library_dependencies(${_arg_DEPENDS})
|
|
||||||
check_library_dependencies(${_arg_PUBLIC_DEPENDS})
|
|
||||||
|
|
||||||
extend_qtc_target(${target_name} ${ARGN})
|
extend_qtc_target(${target_name} ${ARGN})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
@@ -361,10 +361,6 @@ function(find_dependent_plugins varName)
|
|||||||
if(NOT TARGET ${i})
|
if(NOT TARGET ${i})
|
||||||
continue()
|
continue()
|
||||||
endif()
|
endif()
|
||||||
get_property(_class_name TARGET "${i}" PROPERTY QTC_PLUGIN_CLASS_NAME)
|
|
||||||
if (NOT _class_name)
|
|
||||||
message(SEND_ERROR "${i} is a library, not a plugin!")
|
|
||||||
endif()
|
|
||||||
set(_dep)
|
set(_dep)
|
||||||
get_property(_dep TARGET "${i}" PROPERTY _arg_DEPENDS)
|
get_property(_dep TARGET "${i}" PROPERTY _arg_DEPENDS)
|
||||||
if (_dep)
|
if (_dep)
|
||||||
@@ -381,18 +377,6 @@ function(find_dependent_plugins varName)
|
|||||||
set("${varName}" ${_RESULT} PARENT_SCOPE)
|
set("${varName}" ${_RESULT} PARENT_SCOPE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(check_library_dependencies)
|
|
||||||
foreach(i ${ARGN})
|
|
||||||
if (NOT TARGET ${i})
|
|
||||||
continue()
|
|
||||||
endif()
|
|
||||||
get_property(_class_name TARGET "${i}" PROPERTY QTC_PLUGIN_CLASS_NAME)
|
|
||||||
if (_class_name)
|
|
||||||
message(SEND_ERROR "${i} is a plugin, not a library!")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
function(enable_pch target)
|
function(enable_pch target)
|
||||||
if (BUILD_WITH_PCH)
|
if (BUILD_WITH_PCH)
|
||||||
# Skip PCH for targets that do not use the expected visibility settings:
|
# Skip PCH for targets that do not use the expected visibility settings:
|
||||||
|
Reference in New Issue
Block a user