Skip to content
Snippets Groups Projects

Improve plugin.cmake dependency handling.

Merged Martin Heistermann requested to merge plugin-cmake-improvement into master
1 file
+ 8
1
Compare changes
  • Side-by-side
  • Inline
+ 8
1
@@ -207,7 +207,7 @@ macro (_check_plugin_deps _prefix _optional )
if ( ${_optional} STREQUAL "TRUE" )
if ( ${_VAL}_FOUND )
if ( ${_VAL}_FOUND OR ${_val}_FOUND)
# Optional dependency found and recursive found, so add definition to enable it
if ( ${_optional} STREQUAL "TRUE" )
@@ -276,6 +276,9 @@ macro (_check_plugin_deps _prefix _optional )
if (${_val}_FOUND OR ${_VAL}_FOUND)
foreach (_name ${_val} ${_VAL})
if (TARGET ${_name})
list(APPEND ${_prefix}_DEPS_TARGETS ${_name})
endif()
if (DEFINED ${_name}_INCLUDE_PATH)
list (APPEND ${_prefix}_DEPS_INCDIRS "${${_name}_INCLUDE_PATH}")
endif ()
@@ -677,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} )
Loading