vcpkg/ports/libffi/portfile.cmake
driver1998 7d4227f02e
[libffi] Update to v3.3 release (#6119)
* libffi 3.3-rc0 custom port, with arm/arm64 windows support

* fix linux build

* enable EFI64 in linux x64, should fix build errors in some cases

* libffi: move to the arm64 support pr branch

* libffi: move to latest upstream master

* libffi: update to upstream master

* libffi: update to v3.3-rc2

* libffi: update to v3.3 release

* libffi: update version in fficonfig.h

* libffi: Remove CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS

* [libffi] update portfile.cmake

* [libnice] fix Windows ARM64 build

* CI: set atk:arm64-windows to fail
atk compilation requires running glib(arm64) tools, which is not possible on a x86 system.

* CI: libffi:arm64-windows passing

* [gdk-pixbuf] fix Windows ARM64 build

* [pangomm] show unsupported architecture error on ARM

* [pangomm] update portfile.cmake

* [libffi] Avoid depending on VCPKG_TARGET_TRIPLET; use native cmake variables instead. Avoid double expansion inside if().

* [libffi] TARGET is a keyword for if() -- use quoted expansion instead.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-02-07 09:36:39 -08:00

36 lines
1.1 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO libffi/libffi
REF v3.3
SHA512 62798fb31ba65fa2a0e1f71dd3daca30edcf745dc562c6f8e7126e54db92572cc63f5aa36d927dd08375bb6f38a2380ebe6c5735f35990681878fc78fc9dbc83
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY ${CMAKE_CURRENT_LIST_DIR}/libffiConfig.cmake.in DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DFFI_CONFIG_FILE=${CMAKE_CURRENT_LIST_DIR}/fficonfig.h
OPTIONS_DEBUG
-DFFI_SKIP_HEADERS=ON
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()
vcpkg_fixup_cmake_targets()
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(READ ${CURRENT_PACKAGES_DIR}/include/ffi.h FFI_H)
string(REPLACE " *know* they are going to link with the static library. */"
" *know* they are going to link with the static library. */
#define FFI_BUILDING
" FFI_H "${FFI_H}")
file(WRITE ${CURRENT_PACKAGES_DIR}/include/ffi.h "${FFI_H}")
endif()
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)