Avoid arch names in libffi build directories

This is done by simply building libffi in-tree. Normally, this is not
desirable, but in our case is actually ok, as this is an external
dependency to be pulled in and cleaning the source tree is easy in this
case.

Signed-off-by: Christian Blichmann <mail@blichmann.eu>
This commit is contained in:
Christian Blichmann 2020-06-30 08:54:44 +02:00
parent 2ffea13759
commit a51c275a3a
2 changed files with 7 additions and 8 deletions

View File

@ -20,9 +20,9 @@ ExternalProject_Add(libffi
URL https://github.com/libffi/libffi/releases/download/v3.3-rc2/libffi-3.3-rc2.tar.gz URL https://github.com/libffi/libffi/releases/download/v3.3-rc2/libffi-3.3-rc2.tar.gz
URL_HASH SHA256=653ffdfc67fbb865f39c7e5df2a071c0beb17206ebfb0a9ecb18a18f63f6b263 # 2019-11-02 URL_HASH SHA256=653ffdfc67fbb865f39c7e5df2a071c0beb17206ebfb0a9ecb18a18f63f6b263 # 2019-11-02
SOURCE_DIR "${CMAKE_BINARY_DIR}/libffi-src" SOURCE_DIR "${CMAKE_BINARY_DIR}/libffi-src"
CONFIGURE_COMMAND sh -c "./configure \ CONFIGURE_COMMAND ./configure
--disable-dependency-tracking \ --disable-dependency-tracking
&& (mv `sh config.guess` configure-cmake-gen || true)" --disable-builddir
BUILD_COMMAND "" BUILD_COMMAND ""
INSTALL_COMMAND "" INSTALL_COMMAND ""
TEST_COMMAND "" TEST_COMMAND ""

View File

@ -37,11 +37,11 @@ set(_ffi_src "${CMAKE_BINARY_DIR}/libffi-src")
set(libffi_INCLUDE_DIR ${_ffi_src}/libffi/include) set(libffi_INCLUDE_DIR ${_ffi_src}/libffi/include)
add_library(ffi STATIC add_library(ffi STATIC
${_ffi_src}/configure-cmake-gen/fficonfig.h ${_ffi_src}/fficonfig.h
${_ffi_src}/configure-cmake-gen/include/ffi.h ${_ffi_src}/include/ffi.h
${_ffi_src}/configure-cmake-gen/include/ffitarget.h
${_ffi_src}/include/ffi_cfi.h ${_ffi_src}/include/ffi_cfi.h
${_ffi_src}/include/ffi_common.h ${_ffi_src}/include/ffi_common.h
${_ffi_src}/include/ffitarget.h
${_ffi_src}/src/closures.c ${_ffi_src}/src/closures.c
${_ffi_src}/src/debug.c ${_ffi_src}/src/debug.c
${_ffi_src}/src/java_raw_api.c ${_ffi_src}/src/java_raw_api.c
@ -60,8 +60,7 @@ add_library(ffi STATIC
) )
add_library(libffi::libffi ALIAS ffi) add_library(libffi::libffi ALIAS ffi)
target_include_directories(ffi PUBLIC target_include_directories(ffi PUBLIC
${_ffi_src}/configure-cmake-gen ${_ffi_src}
${_ffi_src}/configure-cmake-gen/include
${_ffi_src}/include ${_ffi_src}/include
) )
target_compile_options(ffi PRIVATE target_compile_options(ffi PRIVATE