Commit 033ded89 authored by Ghislain MARY's avatar Ghislain MARY

Automatically handle target dependencies.

parent 8a1471da
......@@ -205,12 +205,27 @@ macro(linphone_builder_get_autotools_configuration)
endmacro()
macro(lcb_add_target_dependencies TARGET_NAME)
set(_args2 "${ARGN}")
foreach(_arg IN LISTS _args2)
set(_list ${TARGET_${_arg}_DEPENDENCIES})
if(_list)
list(REMOVE_ITEM _list "${_arg}")
endif()
if(_list)
lcb_add_target_dependencies("${TARGET_NAME}" ${_list})
endif()
list(FIND TARGET_${TARGET_NAME}_DEPENDENCIES "${_arg}" _target_found)
if(_target_found LESS 0)
list(APPEND TARGET_${TARGET_NAME}_DEPENDENCIES "${_arg}")
endif()
endforeach()
endmacro()
macro(lcb_define_target TARGET_NAME)
unset(TARGET_${TARGET_NAME}_DEPENDENCIES)
set(_args "${ARGN}")
foreach(_arg IN LISTS _args)
list(APPEND TARGET_${TARGET_NAME}_DEPENDENCIES "${_arg}")
endforeach()
lcb_add_target_dependencies("${TARGET_NAME}" ${_args})
list(APPEND TARGET_${TARGET_NAME}_DEPENDENCIES "${TARGET_NAME}")
list(APPEND LINPHONE_BUILDER_TARGETS "${TARGET_NAME}")
set_property(CACHE LINPHONE_BUILDER_TARGET PROPERTY STRINGS ${LINPHONE_BUILDER_TARGETS})
......@@ -267,15 +282,11 @@ macro(linphone_builder_include_builder BUILDER INCLUDE_AFTER DEPENDENCIES _inclu
message(STATUS "Including builder ${BUILDER}")
set(LINPHONE_BUILDER_CURRENT_BUILDER "${BUILDER}")
include(${_builder_filepath})
#if(LINPHONE_BUILDER_INCLUDING_BUILDERS_FROM_EXTERNAL_BUILDERS_PATH)
# list(INSERT LINPHONE_BUILDER_INCLUDED_BUILDERS 0 ${BUILDER})
#else()
if(INCLUDE_AFTER)
list(APPEND ${DEPENDENCIES} ${BUILDER})
else()
list(INSERT ${DEPENDENCIES} 0 ${BUILDER})
endif()
#endif()
set(${_included} 1)
endif()
endif()
......
......@@ -23,8 +23,8 @@
lcb_define_target("bctoolbox")
lcb_define_target("bellesip" "bctoolbox")
lcb_define_target("ortp" "bctoolbox")
lcb_define_target("ms2" "bctoolbox" "ortp")
lcb_define_target("ms2plugins" "bctoolbox" "ortp" "ms2")
lcb_define_target("linphone" "bctoolbox" "bellesip" "ortp" "ms2" "ms2plugins")
lcb_define_target("ms2" "ortp")
lcb_define_target("ms2plugins" "ms2")
lcb_define_target("linphone" "bellesip" "ms2plugins")
lcb_define_target("odb")
lcb_define_target("flexisip" "bctoolbox" "ortp")
lcb_define_target("flexisip" "ortp")
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