Commit 4d24c395 authored by Martin Heistermann's avatar Martin Heistermann

plugin.cmake: collect dependency targets to use modern cmake mechanisms to add...

plugin.cmake: collect dependency targets to use modern cmake mechanisms to add them with include dirs, library paths etc
parent c28c2865
......@@ -277,10 +277,7 @@ macro (_check_plugin_deps _prefix _optional )
if (${_val}_FOUND OR ${_VAL}_FOUND)
foreach (_name ${_val} ${_VAL})
if (TARGET ${_name})
get_target_property(TARGET_INCDIRS ${_name} INTERFACE_INCLUDE_DIRECTORIES)
if (TARGET_INCDIRS)
list (APPEND ${_prefix}_DEPS_INCDIRS ${TARGET_INCDIRS})
endif()
list(APPEND ${_prefix}_DEPS_TARGETS ${_name})
endif()
if (DEFINED ${_name}_INCLUDE_PATH)
list (APPEND ${_prefix}_DEPS_INCDIRS "${${_name}_INCLUDE_PATH}")
......@@ -683,6 +680,10 @@ function (_build_openflipper_plugin plugin)
endif()
endif()
if(${_PLUGIN}_DEPS_TARGETS)
target_link_libraries(Plugin-${plugin} ${${_PLUGIN}_DEPS_TARGETS})
endif()
# append compiler and linker flags from plugin dependencies
list(APPEND ${_PLUGIN}_DEPS_COMPILE_DEFINITIONS ${${_PLUGIN}_CDEFINITIONSADD} )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment