Commit 4d8d7095 authored by Ghislain MARY's avatar Ghislain MARY

Define explicitely the builders that can be grouped.

parent f9fbd6cc
......@@ -24,6 +24,7 @@ set(EP_bellesip_GIT_REPOSITORY "git://git.linphone.org/belle-sip.git" CACHE STRI
set(EP_bellesip_GIT_TAG_LATEST "master" CACHE STRING "bellesip tag to use when compiling latest version")
set(EP_bellesip_GIT_TAG "ef77560739397b042da62189236b2c1889f84cd3" CACHE STRING "bellesip tag to use")
set(EP_bellesip_EXTERNAL_SOURCE_PATHS "belle-sip")
set(EP_bellesip_GROUPABLE YES)
set(EP_bellesip_LINKING_TYPE "${DEFAULT_VALUE_CMAKE_LINKING_TYPE}")
set(EP_bellesip_DEPENDENCIES )
......
......@@ -24,6 +24,7 @@ set(EP_linphone_GIT_REPOSITORY "git://git.linphone.org/linphone.git" CACHE STRIN
set(EP_linphone_GIT_TAG_LATEST "master" CACHE STRING "linphone tag to use when compiling latest version")
set(EP_linphone_GIT_TAG "e3bf7b0387a9e8f782ff745575dd412e193246de" CACHE STRING "linphone tag to use")
set(EP_linphone_EXTERNAL_SOURCE_PATHS "linphone")
set(EP_linphone_GROUPABLE YES)
set(EP_linphone_LINKING_TYPE "${DEFAULT_VALUE_CMAKE_LINKING_TYPE}")
set(EP_linphone_DEPENDENCIES EP_bellesip EP_ortp EP_ms2)
......
......@@ -24,6 +24,7 @@ set(EP_ms2_GIT_REPOSITORY "git://git.linphone.org/mediastreamer2.git" CACHE STRI
set(EP_ms2_GIT_TAG_LATEST "master" CACHE STRING "ms2 tag to use when compiling latest version")
set(EP_ms2_GIT_TAG "810a99275823edc1ca8567c892406c016c48d2f8" CACHE STRING "ms2 tag to use")
set(EP_ms2_EXTERNAL_SOURCE_PATHS "mediastreamer2" "linphone/mediastreamer2")
set(EP_ms2_GROUPABLE YES)
set(EP_ms2_LINKING_TYPE "${DEFAULT_VALUE_CMAKE_LINKING_TYPE}")
set(EP_ms2_DEPENDENCIES EP_ortp)
......
......@@ -24,6 +24,7 @@ set(EP_ortp_GIT_REPOSITORY "git://git.linphone.org/ortp.git" CACHE STRING "ortp
set(EP_ortp_GIT_TAG_LATEST "master" CACHE STRING "ortp tag to use when compiling latest version")
set(EP_ortp_GIT_TAG "ef3258413d81f38033b15cb14362be26471d96d3" CACHE STRING "ortp tag to use")
set(EP_ortp_EXTERNAL_SOURCE_PATHS "oRTP" "ortp" "linphone/oRTP")
set(EP_ortp_GROUPABLE YES)
if(EP_ortp_FORCE_AUTOTOOLS)
set(EP_ortp_LINKING_TYPE "--enable-static")
......
......@@ -369,7 +369,7 @@ macro(linphone_builder_filter_out_inexistent_dependencies PROJNAME)
list(FIND LINPHONE_BUILDER_INCLUDED_BUILDERS_TO_EXCLUDE ${_dep2} _excluded_found)
list(FIND LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH_BUILDERS ${_dep2} _external_source_path_found)
message("_dep: ${_dep2} _found: ${_found} _external_source_path_found: ${_external_source_path_found}")
if(_found GREATER -1 AND _excluded_found EQUAL -1 AND _external_source_path_found EQUAL -1)
if((_found GREATER -1) AND (_excluded_found EQUAL -1) AND ((_external_source_path_found EQUAL -1) OR (NOT EP_${_dep2}_GROUPABLE)))
list(APPEND _new_deps ${_dep})
endif()
endforeach()
......@@ -611,14 +611,22 @@ function(linphone_builder_add_external_projects)
foreach(BUILDER ${LINPHONE_BUILDER_INCLUDED_BUILDERS})
list(FIND LINPHONE_BUILDER_INCLUDED_BUILDERS_TO_EXCLUDE ${BUILDER} _excluded_found)
list(FIND LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH_BUILDERS ${BUILDER} _external_source_path_found)
if((_excluded_found EQUAL -1) AND ((_external_source_path_found EQUAL -1) OR (NOT LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)))
if((_excluded_found EQUAL -1) AND ((_external_source_path_found EQUAL -1) OR (NOT LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS) OR (NOT EP_${BUILDER}_GROUPABLE)))
linphone_builder_add_external_project(${BUILDER})
endif()
endforeach()
endfunction()
function(linphone_builder_add_grouped_external_source_path_projects)
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS AND LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH_BUILDERS)
set(_grouped_builders)
if(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH_BUILDERS)
foreach (_builder ${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH_BUILDERS})
if(EP_${_builder}_GROUPABLE)
list(APPEND _grouped_builders ${_builder})
endif()
endforeach()
endif()
if(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS AND _grouped_builders)
make_directory("${LINPHONE_BUILDER_WORK_DIR}/Source/EP_linphone_builder")
set(_linphone_builder_file "${LINPHONE_BUILDER_WORK_DIR}/Source/EP_linphone_builder/CMakeLists.txt")
file(WRITE "${_linphone_builder_file}" "cmake_minimum_required(VERSION 3.0)\n")
......@@ -628,7 +636,7 @@ function(linphone_builder_add_grouped_external_source_path_projects)
set(EP_linphone_builder_LINKING_TYPES )
set(EP_linphone_builder_EXTRA_LDFLAGS )
set(EP_linphone_builder_DEPENDENCIES )
foreach(BUILDER ${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH_BUILDERS})
foreach(BUILDER ${_grouped_builders})
linphone_builder_add_grouped_external_source_path_project(${BUILDER} "${_linphone_builder_file}")
endforeach()
list(REMOVE_DUPLICATES EP_linphone_builder_LINKING_TYPES)
......@@ -641,12 +649,13 @@ function(linphone_builder_add_grouped_external_source_path_projects)
list(REMOVE_DUPLICATES EP_linphone_builder_CMAKE_OPTIONS)
# TODO: Check for conflicting CMAKE_OPTIONS
list(REMOVE_DUPLICATES EP_linphone_builder_EXTRA_LDFLAGS)
# TODO: Check for conflicting EXTRA_LDFLAGS
list(REMOVE_DUPLICATES EP_linphone_builder_DEPENDENCIES)
list(APPEND EP_linphone_builder_CMAKE_OPTIONS ${EP_linphone_builder_ADDITIONAL_CMAKE_OPTIONS})
linphone_builder_add_external_project("linphone_builder")
add_dependencies(TARGET_linphone_builder EP_linphone_builder)
unset(_conflicting_linking_types)
unset(_linphone_builder_file)
unset(_grouped_builders)
endif()
endfunction()
......
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