Commit 26a352f2 authored by Ghislain MARY's avatar Ghislain MARY

Allow build of autotools builders with ccache.

parent a36092fd
......@@ -116,6 +116,7 @@ else()
set(EP_ffmpeg_TARGET_OS "linux")
set(EP_ffmpeg_PATCH_COMMAND "${PATCH_PROGRAM}" "-p1" "-i" "${CMAKE_CURRENT_SOURCE_DIR}/builders/ffmpeg/no-sdl.patch" ${EP_ffmpeg_PATCH_OPTIONS})
endif()
list(APPEND EP_ffmpeg_CONFIGURE_OPTIONS "--cc=$CC")
endif()
set(EP_ffmpeg_CROSS_COMPILATION_OPTIONS
......
......@@ -53,6 +53,9 @@ else()
"--disable-unit-tests"
"--as=yasm"
)
if(CMAKE_C_COMPILER_LAUNCHER STREQUAL "ccache")
list(APPEND EP_vpx_CONFIGURE_OPTIONS "--enable-ccache")
endif()
if(WIN32)
if(CMAKE_GENERATOR MATCHES "^Visual Studio")
......
......@@ -20,45 +20,21 @@
#
############################################################################
set(OSX_FLAGS "")
if(NOT "@CMAKE_OSX_ARCHITECTURES@" STREQUAL "")
set(OSX_FLAGS "${OSX_FLAGS} -arch @CMAKE_OSX_ARCHITECTURES@")
endif()
if(NOT "@CMAKE_OSX_SYSROOT@" STREQUAL "")
set(OSX_FLAGS "${OSX_FLAGS} -isysroot @CMAKE_OSX_SYSROOT@")
endif()
if("@CMAKE_C_COMPILER_ID@" STREQUAL "GNU")
string(REGEX REPLACE "gcc$" "as" AS_COMPILER "@CMAKE_C_COMPILER@")
set(AUTOTOOLS_AS_COMPILER ${AS_COMPILER} CACHE PATH "Initial cache" FORCE)
endif()
set(AUTOTOOLS_C_COMPILER "@CMAKE_C_COMPILER@ ${OSX_FLAGS}" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_CXX_COMPILER "@CMAKE_CXX_COMPILER@ ${OSX_FLAGS}" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_COMPILER "@CMAKE_C_COMPILER@ ${OSX_FLAGS}" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_C_COMPILER "@CMAKE_C_COMPILER_LAUNCHER@ @CMAKE_C_COMPILER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_CXX_COMPILER "@CMAKE_CXX_COMPILER_LAUNCHER@ @CMAKE_CXX_COMPILER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_COMPILER "@CMAKE_C_COMPILER_LAUNCHER@ @CMAKE_C_COMPILER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_LINKER "@CMAKE_LINKER@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_AR "@CMAKE_AR@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_RANLIB "@CMAKE_RANLIB@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_STRIP "@CMAKE_STRIP@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_NM "@CMAKE_NM@" CACHE PATH "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS_MINSIZEREL "@CMAKE_C_FLAGS_MINSIZEREL@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS_RELEASE "@CMAKE_C_FLAGS_RELEASE@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS_RELWITHDEBINFO "@CMAKE_C_FLAGS_RELWITHDEBINFO@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_C_FLAGS "@CMAKE_C_FLAGS@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_DEBUG "@CMAKE_CXX_FLAGS_DEBUG@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_MINSIZEREL "@CMAKE_CXX_FLAGS_MINSIZEREL@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_RELEASE "@CMAKE_CXX_FLAGS_RELEASE@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS_RELWITHDEBINFO "@CMAKE_CXX_FLAGS_RELWITHDEBINFO@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_CXX_FLAGS "@CMAKE_CXX_FLAGS@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_MINSIZEREL "@CMAKE_C_FLAGS_MINSIZEREL@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_RELEASE "@CMAKE_C_FLAGS_RELEASE@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS_RELWITHDEBINFO "@CMAKE_C_FLAGS_RELWITHDEBINFO@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_OBJC_FLAGS "@CMAKE_C_FLAGS@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_DEBUG "@CMAKE_EXE_LINKER_FLAGS_DEBUG@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_MINSIZEREL "@CMAKE_EXE_LINKER_FLAGS_MINSIZEREL@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_RELEASE "@CMAKE_EXE_LINKER_FLAGS_RELEASE@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS_RELWITHDEBINFO "@CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO@" CACHE STRING "Initial cache" FORCE)
set(AUTOTOOLS_LINKER_FLAGS "@CMAKE_EXE_LINKER_FLAGS@" CACHE STRING "Initial cache" FORCE)
......@@ -146,6 +146,12 @@ function(linphone_builder_get_autotools_configuration)
if(CMAKE_OSX_ARCHITECTURES)
list(APPEND _autotools_command "-DCMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}")
endif()
if(CMAKE_C_COMPILER_LAUNCHER)
list(APPEND _autotools_command "-DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER}")
endif()
if(CMAKE_CXX_COMPILER_LAUNCHER)
list(APPEND _autotools_command "-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}")
endif()
list(APPEND _autotools_command "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Autotools/")
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/Autotools)
execute_process(COMMAND ${_autotools_command} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Autotools)
......
......@@ -13,12 +13,12 @@ export RANLIB="@AUTOTOOLS_RANLIB@"
export STRIP="@AUTOTOOLS_STRIP@"
export NM="@AUTOTOOLS_NM@"
export ASFLAGS="@ep_asflags@"
export CPPFLAGS="@ep_cppflags@"
export CFLAGS="@ep_cflags@"
export CXXFLAGS="@ep_cxxflags@"
export OBJCFLAGS="@ep_objcflags@"
export LDFLAGS="@ep_ldflags@"
ASFLAGS="@ep_asflags@"
CPPFLAGS="@ep_cppflags@"
CFLAGS="@ep_cflags@"
CXXFLAGS="@ep_cxxflags@"
OBJCFLAGS="@ep_objcflags@"
LDFLAGS="@ep_ldflags@"
export PKG_CONFIG="@LINPHONE_BUILDER_PKG_CONFIG@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
......
......@@ -13,12 +13,12 @@ export RANLIB="@AUTOTOOLS_RANLIB@"
export STRIP="@AUTOTOOLS_STRIP@"
export NM="@AUTOTOOLS_NM@"
export ASFLAGS="@ep_asflags@"
export CPPFLAGS="@ep_cppflags@"
export CFLAGS="@ep_cflags@"
export CXXFLAGS="@ep_cxxflags@"
export OBJCFLAGS="@ep_objcflags@"
export LDFLAGS="@ep_ldflags@"
ASFLAGS="@ep_asflags@"
CPPFLAGS="@ep_cppflags@"
CFLAGS="@ep_cflags@"
CXXFLAGS="@ep_cxxflags@"
OBJCFLAGS="@ep_objcflags@"
LDFLAGS="@ep_ldflags@"
export PKG_CONFIG="@LINPHONE_BUILDER_PKG_CONFIG@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
......
......@@ -13,12 +13,12 @@ export RANLIB="@AUTOTOOLS_RANLIB@"
export STRIP="@AUTOTOOLS_STRIP@"
export NM="@AUTOTOOLS_NM@"
export ASFLAGS="@ep_asflags@"
export CPPFLAGS="@ep_cppflags@"
export CFLAGS="@ep_cflags@"
export CXXFLAGS="@ep_cxxflags@"
export OBJCFLAGS="@ep_objcflags@"
export LDFLAGS="@ep_ldflags@"
ASFLAGS="@ep_asflags@"
CPPFLAGS="@ep_cppflags@"
CFLAGS="@ep_cflags@"
CXXFLAGS="@ep_cxxflags@"
OBJCFLAGS="@ep_objcflags@"
LDFLAGS="@ep_ldflags@"
export PKG_CONFIG="@LINPHONE_BUILDER_PKG_CONFIG@"
export PKG_CONFIG_PATH="@LINPHONE_BUILDER_PKG_CONFIG_PATH@"
......
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