aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libffi/unofficial-libffi-config.cmake
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libffi/unofficial-libffi-config.cmake
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libffi/unofficial-libffi-config.cmake')
-rw-r--r--vcpkg/ports/libffi/unofficial-libffi-config.cmake20
1 files changed, 20 insertions, 0 deletions
diff --git a/vcpkg/ports/libffi/unofficial-libffi-config.cmake b/vcpkg/ports/libffi/unofficial-libffi-config.cmake
new file mode 100644
index 0000000..453f634
--- /dev/null
+++ b/vcpkg/ports/libffi/unofficial-libffi-config.cmake
@@ -0,0 +1,20 @@
+if(NOT TARGET unofficial::libffi::libffi)
+ get_filename_component(VCPKG_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../../" ABSOLUTE)
+ find_library(VCPKG_LIBFFI_LIBRARY_RELEASE NAMES ffi PATHS "${VCPKG_IMPORT_PREFIX}/lib" REQUIRED)
+ find_library(VCPKG_LIBFFI_LIBRARY_DEBUG NAMES ffi PATHS "${VCPKG_IMPORT_PREFIX}/debug/lib")
+ mark_as_advanced(VCPKG_LIBFFI_LIBRARY_RELEASE VCPKG_LIBFFI_LIBRARY_DEBUG)
+ add_library(unofficial::libffi::libffi UNKNOWN IMPORTED)
+ set_target_properties(unofficial::libffi::libffi PROPERTIES
+ IMPORTED_CONFIGURATIONS "Release"
+ INTERFACE_INCLUDE_DIRECTORIES "${VCPKG_IMPORT_PREFIX}/include"
+ IMPORTED_LOCATION_RELEASE "${VCPKG_LIBFFI_LIBRARY_RELEASE}"
+ IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
+ )
+ if(VCPKG_LIBFFI_LIBRARY_DEBUG)
+ set_property(TARGET unofficial::libffi::libffi APPEND PROPERTY IMPORTED_CONFIGURATIONS Debug)
+ set_target_properties(unofficial::libffi::libffi PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${VCPKG_LIBFFI_LIBRARY_DEBUG}"
+ IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
+ )
+ endif()
+endif()