Commit 40bfd0f9 authored by Ghislain MARY's avatar Ghislain MARY

Define LINPHONE_BUILDER_TOP_DIR option and allow setting it as external source path.

parent 64982b9e
......@@ -26,6 +26,7 @@ include(FeatureSummary)
set(LINPHONE_BUILDER_CONFIG_FILE "configs/config-desktop.cmake" CACHE STRING "Path to the linphone builder configuration file.")
set(LINPHONE_BUILDER_TOP_DIR "${CMAKE_SOURCE_DIR}" CACHE STRING "Top directory of the source tree.")
set(LINPHONE_BUILDER_WORK_DIR "${CMAKE_CURRENT_SOURCE_DIR}/WORK" CACHE PATH "Working directory for the build.")
set(LINPHONE_BUILDER_TARGET "linphone" CACHE STRING "Target to build.")
set_property(CACHE LINPHONE_BUILDER_TARGET PROPERTY STRINGS "belle-sip" "ortp" "ms2" "ms2-plugins" "linphone" "flexisip")
......
......@@ -23,7 +23,7 @@
set(EP_flexisip_GIT_REPOSITORY "git://git.linphone.org/flexisip" CACHE STRING "flexisip repository URL")
set(EP_flexisip_GIT_TAG_LATEST "master" CACHE STRING "flexisip tag to use when compiling latest version")
set(EP_flexisip_GIT_TAG "0b733d671bbb72e2aa2708f37ba49e8801203154" CACHE STRING "flexisip tag to use")
set(EP_flexisip_EXTERNAL_SOURCE_PATHS "..")
set(EP_flexisip_EXTERNAL_SOURCE_PATHS "<LINPHONE_BUILDER_TOP_DIR>")
set(EP_flexisip_GROUPABLE YES)
if(EP_flexisip_FORCE_AUTOTOOLS)
......
......@@ -199,9 +199,13 @@ macro(linphone_builder_add_builder_to_target TARGETNAME BUILDER)
linphone_builder_include_builder(${BUILDER})
if(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH AND (LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS OR LINPHONE_BUILDER_BUILD_ONLY_EXTERNAL_SOURCE_PATH))
foreach(SUBDIR ${EP_${BUILDER}_EXTERNAL_SOURCE_PATHS})
set(_source_dir "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
if(SUBDIR STREQUAL "<LINPHONE_BUILDER_TOP_DIR>")
set(_source_dir "${LINPHONE_BUILDER_TOP_DIR}")
else()
set(_source_dir "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
endif()
if(EXISTS "${_source_dir}")
#message(" ${TARGETNAME} depends on external source path ${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
#message(" ${TARGETNAME} depends on external source path ${_source_dir}")
set(_build_from_external_source_path 1)
break()
endif()
......@@ -209,7 +213,7 @@ macro(linphone_builder_add_builder_to_target TARGETNAME BUILDER)
if(_build_from_external_source_path)
list(FIND LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH_BUILDERS ${BUILDER} _already_included)
if(_already_included EQUAL -1)
message(" external source path builder ${BUILDER}")
message(" external source path builder ${BUILDER}: ${_source_dir}")
set(EP_${BUILDER}_SOURCE_DIR "${_source_dir}")
list(APPEND LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH_BUILDERS ${BUILDER})
endif()
......
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