Commit 648ec5a0 authored by Ghislain MARY's avatar Ghislain MARY

Handle all types of extra flags when grouping projects.

parent d95ceb9e
......@@ -590,7 +590,11 @@ macro(linphone_builder_add_grouped_external_source_path_project PROJNAME FILENAM
file(APPEND "${FILENAME}" "add_subdirectory(\"${EP_${PROJNAME}_SOURCE_DIR}\" \"${LINPHONE_BUILDER_WORK_DIR}/Build/${PROJNAME}\")\n")
list(APPEND EP_linphone_builder_LINKING_TYPES "${EP_${PROJNAME}_LINKING_TYPE}")
list(APPEND EP_linphone_builder_CMAKE_OPTIONS "${EP_${PROJNAME}_CMAKE_OPTIONS}")
list(APPEND EP_linphone_builder_EXTRA_CFLAGS "${EP_${PROJNAME}_EXTRA_CFLAGS}")
list(APPEND EP_linphone_builder_EXTRA_CPPFLAGS "${EP_${PROJNAME}_EXTRA_CPPFLAGS}")
list(APPEND EP_linphone_builder_EXTRA_CXXFLAGS "${EP_${PROJNAME}_EXTRA_CXXFLAGS}")
list(APPEND EP_linphone_builder_EXTRA_LDFLAGS "${EP_${PROJNAME}_EXTRA_LDFLAGS}")
list(APPEND EP_linphone_builder_EXTRA_OBJCFLAGS "${EP_${PROJNAME}_EXTRA_OBJCFLAGS}")
list(APPEND EP_linphone_builder_ADDITIONAL_CMAKE_OPTIONS "-DEP_${PROJNAME}_INCLUDE_DIR=${EP_${PROJNAME}_SOURCE_DIR}/include")
list(APPEND EP_linphone_builder_ADDITIONAL_CMAKE_OPTIONS "-DEP_${PROJNAME}_CONFIG_DIR=${LINPHONE_BUILDER_WORK_DIR}/Build/${PROJNAME}")
if(EP_${PROJNAME}_DEPENDENCIES)
......@@ -656,7 +660,11 @@ function(linphone_builder_add_grouped_external_source_path_projects)
file(APPEND "${_linphone_builder_file}" "option(LINPHONE_BUILDER_GROUP_EXTERNAL_SOURCE_PATH_BUILDERS \"Group external source path builders.\" ON)\n")
set(EP_linphone_builder_CMAKE_OPTIONS )
set(EP_linphone_builder_LINKING_TYPES )
set(EP_linphone_builder_EXTRA_CFLAGS )
set(EP_linphone_builder_EXTRA_CPPFLAGS )
set(EP_linphone_builder_EXTRA_CXXFLAGS )
set(EP_linphone_builder_EXTRA_LDFLAGS )
set(EP_linphone_builder_EXTRA_OBJCFLAGS )
set(EP_linphone_builder_DEPENDENCIES )
foreach(BUILDER ${_grouped_builders})
linphone_builder_add_grouped_external_source_path_project(${BUILDER} "${_linphone_builder_file}")
......@@ -669,9 +677,21 @@ function(linphone_builder_add_grouped_external_source_path_projects)
set(EP_linphone_builder_LINKING_TYPE ${EP_linphone_builder_LINKING_TYPES})
endif()
detect_conflicting_cmake_options()
if(EP_linphone_builder_EXTRA_CFLAGS)
list(REMOVE_DUPLICATES EP_linphone_builder_EXTRA_CFLAGS)
endif()
if(EP_linphone_builder_EXTRA_CPPFLAGS)
list(REMOVE_DUPLICATES EP_linphone_builder_EXTRA_CPPFLAGS)
endif()
if(EP_linphone_builder_EXTRA_CXXFLAGS)
list(REMOVE_DUPLICATES EP_linphone_builder_EXTRA_CXXFLAGS)
endif()
if(EP_linphone_builder_EXTRA_LDFLAGS)
list(REMOVE_DUPLICATES EP_linphone_builder_EXTRA_LDFLAGS)
endif()
if(EP_linphone_builder_EXTRA_OBJCFLAGS)
list(REMOVE_DUPLICATES EP_linphone_builder_EXTRA_OBJCFLAGS)
endif()
if(EP_linphone_builder_DEPENDENCIES)
list(REMOVE_DUPLICATES EP_linphone_builder_DEPENDENCIES)
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