1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-01-27 00:18:12 +03:00

cmake: sync and improve Find modules, add pkg-config native detection

- sync code between Find modules.
- wolfssl: replace `pkg-config` hints with native detection.
- libgcrypt, mbedtls: add `pkg-config`-based native detection.
- libgcrypt: add version detection.
- limit `pkg-config` use for `UNIX`, vcpkg, and non-cross MinGW builds,
  and builds with no manual customization via `*_INCLUDE_DIR` or
  `*_LIBRARY`.
- replace and sync Find module header comments.
- ci: delete manual mbedTLS config that's now redundant.

Based on similar work done in curl.

Second attempt at #1420
Closes #1445
This commit is contained in:
Viktor Szakats
2024-08-17 23:23:06 +02:00
parent 4b5f6b1031
commit 45064137ac
5 changed files with 179 additions and 118 deletions

View File

@@ -594,7 +594,7 @@ jobs:
- name: 'mbedTLS'
install: mbedtls
configure: --with-crypto=mbedtls "--with-libmbedcrypto-prefix=$(brew --prefix)"
cmake: -DCRYPTO_BACKEND=mbedTLS "-DMBEDTLS_INCLUDE_DIR=$(brew --prefix)/opt/mbedtls/include" "-DMBEDCRYPTO_LIBRARY=$(brew --prefix)/opt/mbedtls/lib/libmbedcrypto.a"
cmake: -DCRYPTO_BACKEND=mbedTLS
steps:
- name: 'install packages'
run: brew install ${{ matrix.build == 'autotools' && 'automake libtool' || 'ninja' }} ${{ matrix.crypto.install }}