Commit 60aae7a9 authored by Ghislain MARY's avatar Ghislain MARY

Allow use of alternate external source path.

parent b3452587
...@@ -33,6 +33,7 @@ set(LINPHONE_BUILDER_PREBUILT_URL "" CACHE STRING "URL to download some prebuilt ...@@ -33,6 +33,7 @@ set(LINPHONE_BUILDER_PREBUILT_URL "" CACHE STRING "URL to download some prebuilt
option(LINPHONE_BUILDER_LATEST "Build latest versions (from git)." NO) option(LINPHONE_BUILDER_LATEST "Build latest versions (from git)." NO)
option(LINPHONE_BUILDER_CHECK_LASTEST "Check that the git revisions are the latest ones." NO) option(LINPHONE_BUILDER_CHECK_LASTEST "Check that the git revisions are the latest ones." NO)
set(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH "" CACHE PATH "External path to source code that is available.") set(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH "" CACHE PATH "External path to source code that is available.")
set(LINPHONE_BUILDER_ALTERNATE_EXTERNAL_SOURCE_PATH "" CACHE PATH "Alternate external path to source code that is available.")
set(LINPHONE_BUILDER_DUMMY_LIBRARIES "" CACHE STRING "Dummy libraries to be generated.") set(LINPHONE_BUILDER_DUMMY_LIBRARIES "" CACHE STRING "Dummy libraries to be generated.")
option(LINPHONE_BUILDER_USE_SYSTEM_DEPENDENCIES "Use system dependencies." NO) option(LINPHONE_BUILDER_USE_SYSTEM_DEPENDENCIES "Use system dependencies." NO)
option(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS "Group external source path builders in a single external project." NO) option(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS "Group external source path builders in a single external project." NO)
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
lcb_git_repository("https://gitlab.linphone.org/BC/public/external/minizip.git") lcb_git_repository("https://gitlab.linphone.org/BC/public/external/minizip.git")
lcb_git_tag_latest("master") lcb_git_tag_latest("master")
lcb_git_tag("d65cd2ea9d740f62884e0beaf8ab86740620c783") lcb_git_tag("d65cd2ea9d740f62884e0beaf8ab86740620c783")
lcb_external_source_paths("externals/minizip" "../submodules/externals/minizip") lcb_external_source_paths("externals/minizip")
lcb_spec_file("minizip.spec") lcb_spec_file("minizip.spec")
lcb_dependencies("zlib") lcb_dependencies("zlib")
......
...@@ -278,12 +278,16 @@ macro(linphone_builder_add_builder_to_target TARGETNAME BUILDER INCLUDE_AFTER DE ...@@ -278,12 +278,16 @@ macro(linphone_builder_add_builder_to_target TARGETNAME BUILDER INCLUDE_AFTER DE
list(APPEND LINPHONE_BUILDER_INCLUDED_BUILDERS_TO_EXCLUDE ${BUILDER}) list(APPEND LINPHONE_BUILDER_INCLUDED_BUILDERS_TO_EXCLUDE ${BUILDER})
list(APPEND LINPHONE_BUILDER_SYSTEM_DEPENDENCIES_BUILDERS ${BUILDER}) list(APPEND LINPHONE_BUILDER_SYSTEM_DEPENDENCIES_BUILDERS ${BUILDER})
endif() endif()
elseif(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH AND LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS) elseif((LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH OR LINPHONE_BUILDER_ALTERNATE_EXTERNAL_SOURCE_PATH) AND LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS)
foreach(SUBDIR ${EP_${BUILDER}_EXTERNAL_SOURCE_PATHS}) foreach(SUBDIR ${EP_${BUILDER}_EXTERNAL_SOURCE_PATHS})
if(SUBDIR STREQUAL "<LINPHONE_BUILDER_TOP_DIR>") if(SUBDIR STREQUAL "<LINPHONE_BUILDER_TOP_DIR>")
set(_source_dir "${LINPHONE_BUILDER_TOP_DIR}") set(_source_dir "${LINPHONE_BUILDER_TOP_DIR}")
else() else()
set(_source_dir "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}") if(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH AND EXISTS "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
set(_source_dir "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
else()
set(_source_dir "${LINPHONE_BUILDER_ALTERNATE_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
endif()
endif() endif()
if(EXISTS "${_source_dir}") if(EXISTS "${_source_dir}")
#message(" ${TARGETNAME} depends on external source path ${_source_dir}") #message(" ${TARGETNAME} depends on external source path ${_source_dir}")
...@@ -576,13 +580,17 @@ macro(linphone_builder_add_external_project PROJNAME) ...@@ -576,13 +580,17 @@ macro(linphone_builder_add_external_project PROJNAME)
set(EP_${PROJNAME}_BUILD_METHOD "rpm") set(EP_${PROJNAME}_BUILD_METHOD "rpm")
endif() endif()
if(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH) if(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH OR LINPHONE_BUILDER_ALTERNATE_EXTERNAL_SOURCE_PATH)
foreach(SUBDIR ${EP_${PROJNAME}_EXTERNAL_SOURCE_PATHS}) foreach(SUBDIR ${EP_${PROJNAME}_EXTERNAL_SOURCE_PATHS})
if(NOT EP_${PROJNAME}_SOURCE_DIR) if(NOT EP_${PROJNAME}_SOURCE_DIR)
if(SUBDIR STREQUAL "<LINPHONE_BUILDER_TOP_DIR>") if(SUBDIR STREQUAL "<LINPHONE_BUILDER_TOP_DIR>")
set(_source_dir "${LINPHONE_BUILDER_TOP_DIR}") set(_source_dir "${LINPHONE_BUILDER_TOP_DIR}")
else() else()
set(_source_dir "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}") if(LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH AND EXISTS "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
set(_source_dir "${LINPHONE_BUILDER_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
else()
set(_source_dir "${LINPHONE_BUILDER_ALTERNATE_EXTERNAL_SOURCE_PATH}/${SUBDIR}")
endif()
endif() endif()
if(EXISTS "${_source_dir}") if(EXISTS "${_source_dir}")
set(EP_${PROJNAME}_SOURCE_DIR "${_source_dir}") set(EP_${PROJNAME}_SOURCE_DIR "${_source_dir}")
......
...@@ -57,6 +57,7 @@ class Target: ...@@ -57,6 +57,7 @@ class Target:
self.cmake_dir = self.work_dir + '/cmake' self.cmake_dir = self.work_dir + '/cmake'
self.abs_cmake_dir = os.getcwd() + '/' + self.cmake_dir self.abs_cmake_dir = os.getcwd() + '/' + self.cmake_dir
self.external_source_path = None self.external_source_path = None
self.alternate_external_source_path = None
self.lazy_install_message = True self.lazy_install_message = True
def output_dir(self): def output_dir(self):
...@@ -94,6 +95,10 @@ class Target: ...@@ -94,6 +95,10 @@ class Target:
if platform.system() == 'Windows': if platform.system() == 'Windows':
self.external_source_path = self.external_source_path.replace('\\', '/') self.external_source_path = self.external_source_path.replace('\\', '/')
cmd += ['-DLINPHONE_BUILDER_EXTERNAL_SOURCE_PATH=' + self.external_source_path] cmd += ['-DLINPHONE_BUILDER_EXTERNAL_SOURCE_PATH=' + self.external_source_path]
if self.alternate_external_source_path is not None:
if platform.system() == 'Windows':
self.alternate_external_source_path = self.alternate_external_source_path.replace('\\', '/')
cmd += ['-DLINPHONE_BUILDER_ALTERNATE_EXTERNAL_SOURCE_PATH=' + self.alternate_external_source_path]
if args.group: if args.group:
cmd += ['-DLINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS=YES'] cmd += ['-DLINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS=YES']
if args.debug_verbose: if args.debug_verbose:
......
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