Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions ports/libffi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "ARM")
set(TARGET ARM)
elseif(CMAKE_SYSTEM_NAME MATCHES "BSD" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(TARGET X86_FREEBSD)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM")
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND ARCH_NAME STREQUAL "arm")
set(TARGET ARM_WIN32)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND ARCH_NAME STREQUAL "arm64")
set(TARGET ARM_WIN64)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND ARCH_NAME STREQUAL "x86")
set(TARGET X86_WIN32)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows" AND ARCH_NAME STREQUAL "x64")
set(TARGET X86_WIN64)
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(TARGET X86_DARWIN)
Expand Down
5 changes: 2 additions & 3 deletions ports/libffi/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Source: libffi
Version: 3.3
Version: 3.3-1
Homepage: https://github.com/libffi/libffi
Description: Portable, high level programming interface to various calling conventions
Supports: !arm
Description: Portable, high level programming interface to various calling conventions
11 changes: 6 additions & 5 deletions ports/libffi/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DFFI_CONFIG_FILE=${CMAKE_CURRENT_LIST_DIR}/fficonfig.h
-DARCH_NAME=${VCPKG_TARGET_ARCHITECTURE}
OPTIONS_DEBUG
-DFFI_SKIP_HEADERS=ON
)
Expand All @@ -23,13 +24,13 @@ 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. */
vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/include/ffi.h
" *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)