aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Stöggl <c72578@yahoo.de>2020-01-16 01:36:00 +0100
committerVictor Romero <romerosanchezv@gmail.com>2020-01-15 16:36:00 -0800
commit41fdef7a168e80cd1a381870727f688c37cc9c0a (patch)
tree3faf4baf46d854c2723efb352f7ddbbdcc846b85
parent562515f3281b745ac18062499ff8f5147f021fce (diff)
downloadvcpkg-41fdef7a168e80cd1a381870727f688c37cc9c0a.tar.gz
vcpkg-41fdef7a168e80cd1a381870727f688c37cc9c0a.zip
[libffi] Add libffiConfigVersion.cmake file (#8895)
Use write_basic_package_version_file() to create the libffiConfigVersion.cmake file. This allows detection of the libffi version using cmake. An example, where this is relevant is e.g. glib 2.62, with the following code in meson.build: libffi_dep = dependency('libffi', version : '>= 3.0.0', fallback : ['libffi', 'ffi_dep']) When the libffiConfigVersion.cmake file is present, the following output can be found in the meson-build.log: Run-time dependency libffi found: YES 3.1
-rw-r--r--ports/libffi/CMakeLists.txt7
-rw-r--r--ports/libffi/CONTROL2
2 files changed, 8 insertions, 1 deletions
diff --git a/ports/libffi/CMakeLists.txt b/ports/libffi/CMakeLists.txt
index ae57e7b1a..b645de313 100644
--- a/ports/libffi/CMakeLists.txt
+++ b/ports/libffi/CMakeLists.txt
@@ -132,7 +132,14 @@ include(CMakePackageConfigHelpers)
configure_package_config_file(${PROJECT_NAME}Config.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION share/${PROJECT_NAME})
+# Disable check for same 32/64bit-ness in libffiConfigVersion.cmake by setting CMAKE_SIZEOF_VOID_P
+set (CMAKE_SIZEOF_VOID_P "")
+write_basic_package_version_file(
+ ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake
+ VERSION ${VERSION}
+ COMPATIBILITY AnyNewerVersion)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
DESTINATION share/${PROJECT_NAME})
install(EXPORT ${PROJECT_NAME}Targets
DESTINATION share/${PROJECT_NAME})
diff --git a/ports/libffi/CONTROL b/ports/libffi/CONTROL
index 2fb2301a9..4492dbce1 100644
--- a/ports/libffi/CONTROL
+++ b/ports/libffi/CONTROL
@@ -1,4 +1,4 @@
Source: libffi
-Version: 3.1-6
+Version: 3.1-7
Homepage: https://github.com/libffi/libffi
Description: Portable, high level programming interface to various calling conventions