cmake: detect libssh via pkg-config

Also:
- fix broken libssh `pkg-config` behaviour on old Linux.
  (when found, `LIBSSH_LINK_LIBRARIES` remains undefined.)

- delete manual libssh config from Old Linux CI job,
  it's no longer necessary.

Closes #14199
This commit is contained in:
Viktor Szakats 2024-07-16 12:48:13 +02:00
parent efce544418
commit e8acb2e55a
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
2 changed files with 14 additions and 5 deletions

View file

@ -89,8 +89,7 @@ jobs:
run: |
mkdir bld-cares
cd bld-cares
cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON -DENABLE_ARES=ON -DCURL_ZSTD=ON -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF \
-DUSE_LIBSSH=ON '-DCMAKE_C_FLAGS=-I/usr/include -L/usr/lib -lssh'
cmake .. -DCMAKE_UNITY_BUILD=ON -DCURL_WERROR=ON -DBUILD_SHARED_LIBS=ON -DENABLE_ARES=ON -DCURL_ZSTD=ON -DCURL_USE_GSSAPI=ON -DCURL_USE_LIBSSH2=OFF -DCURL_USE_LIBSSH=ON
- name: 'build'
run: |