Commit 8f578b76 authored by Ghislain MARY's avatar Ghislain MARY

Fix source path for projects not built with CMake and found in an external source path.

parent cf84de7f
...@@ -442,7 +442,11 @@ endmacro() ...@@ -442,7 +442,11 @@ endmacro()
macro(linphone_builder_set_ep_directories PROJNAME) macro(linphone_builder_set_ep_directories PROJNAME)
get_filename_component(CONFIG_NAME ${LINPHONE_BUILDER_CONFIG_FILE} NAME_WE) get_filename_component(CONFIG_NAME ${LINPHONE_BUILDER_CONFIG_FILE} NAME_WE)
string(REGEX REPLACE "config-" "" CONFIG_NAME ${CONFIG_NAME}) string(REGEX REPLACE "config-" "" CONFIG_NAME ${CONFIG_NAME})
set(ep_source "${ep_base}/Source/EP_${PROJNAME}") if(EP_${PROJNAME}_SOURCE_DIR)
set(ep_source "${EP_${PROJNAME}_SOURCE_DIR}")
else()
set(ep_source "${ep_base}/Source/EP_${PROJNAME}")
endif()
set(ep_tmp "${ep_base}/tmp-${CONFIG_NAME}/${PROJNAME}") set(ep_tmp "${ep_base}/tmp-${CONFIG_NAME}/${PROJNAME}")
set(ep_stamp "${ep_base}/Stamp-${CONFIG_NAME}/${PROJNAME}") set(ep_stamp "${ep_base}/Stamp-${CONFIG_NAME}/${PROJNAME}")
if("${EP_${PROJNAME}_BUILD_IN_SOURCE}" STREQUAL "yes") if("${EP_${PROJNAME}_BUILD_IN_SOURCE}" STREQUAL "yes")
...@@ -501,6 +505,16 @@ function(linphone_builder_configure_file_for_project PROJNAME CMD DEFAULT_CONF_F ...@@ -501,6 +505,16 @@ function(linphone_builder_configure_file_for_project PROJNAME CMD DEFAULT_CONF_F
endfunction() endfunction()
function(linphone_builder_add_project PROJNAME) function(linphone_builder_add_project PROJNAME)
if(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH)
foreach(SUBDIR ${EP_${PROJNAME}_EXTERNAL_SOURCE_PATHS})
if(NOT EP_${PROJNAME}_SOURCE_DIR)
if(EXISTS "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
set(EP_${PROJNAME}_SOURCE_DIR "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
endif()
endif()
endforeach()
endif()
linphone_builder_set_ep_directories(${PROJNAME}) linphone_builder_set_ep_directories(${PROJNAME})
linphone_builder_apply_cmake_flags_to_autotools_project(${PROJNAME}) linphone_builder_apply_cmake_flags_to_autotools_project(${PROJNAME})
linphone_builder_apply_extra_flags(${PROJNAME}) linphone_builder_apply_extra_flags(${PROJNAME})
...@@ -652,16 +666,6 @@ function(linphone_builder_add_project PROJNAME) ...@@ -652,16 +666,6 @@ function(linphone_builder_add_project PROJNAME)
) )
endif() endif()
if(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH)
foreach(SUBDIR ${EP_${PROJNAME}_EXTERNAL_SOURCE_PATHS})
if(NOT EP_${PROJNAME}_SOURCE_DIR)
if(EXISTS "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
set(EP_${PROJNAME}_SOURCE_DIR "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
endif()
endif()
endforeach()
endif()
if(LINPHONE_BUILDER_LATEST AND EP_${PROJNAME}_GIT_TAG_LATEST) if(LINPHONE_BUILDER_LATEST AND EP_${PROJNAME}_GIT_TAG_LATEST)
set(DOWNLOAD_SOURCE GIT_REPOSITORY ${EP_${PROJNAME}_GIT_REPOSITORY} GIT_TAG ${EP_${PROJNAME}_GIT_TAG_LATEST}) set(DOWNLOAD_SOURCE GIT_REPOSITORY ${EP_${PROJNAME}_GIT_REPOSITORY} GIT_TAG ${EP_${PROJNAME}_GIT_TAG_LATEST})
elseif(EP_${PROJNAME}_SOURCE_DIR) elseif(EP_${PROJNAME}_SOURCE_DIR)
......
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