aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2024-03-08Rework the coverage buildJakub Jelen1-3/+4
This reworks it to avoid a need to special build type and adding the flags only to the targets that need it (skipping testing wrappers which break with them). It also updates the CodeCoverage module from the following URL: https://github.com/bilke/cmake-modules/blob/master/CodeCoverage.cmake Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2024-02-22cmake: use imported targets for OpenSSL and zlibGregor Jasny1-6/+0
Imported targets are highly preferred over the individual variables for includes and libs because they will be used in a coherent way and any spelling mistakes or unavailability won't go unnoticed. Also it will prevent bugs like conan-io/conan-center-index#16900 or using mismatching header/libs combinations. Signed-off-by: Gregor Jasny <gjasny@googlemail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2024-02-22cmake: remove fallback for crypto lib lookupGregor Jasny1-24/+8
because if a fallback happens, the WITH_(GCRYPT|MBEDTLS) variables do not match the selection, anymore. Also a silent fallback is pretty bad if it is unnoticed. Signed-off-by: Gregor Jasny <gjasny@googlemail.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2024-02-22cmake: Use Python find_packageAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2023-12-05Make compile-commands generation conditionalSven Fischer1-4/+7
To not "pollute" projects with the compile-commands.json link if they include libssh as a subproject (e.g. with add_subdirectory()), check if libssh is the root project and only create the link in this case. Signed-off-by: Sven Fischer <sven@leiderfischer.de> Reviewed-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2023-08-29build: Bump the minimal cmake version to 3.5Jakub Jelen1-1/+1
We use string(APPEND) from version 3.4 for 5 years and CMake is deprecating support for versions before 3.5 so bumping one more version. Fixes: #209 Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Aris Adamantiadis <aris@0xbadc0de.be>
2023-06-01Remove remained HAVE_DSA ifdefs and WITH_DSANorbert Pocs1-1/+0
Signed-off-by: Norbert Pocs <npocs@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2023-03-01Add support for PKCS#11 provider in OpenSSL 3.0Jakub Jelen1-7/+1
The engine API in OpenSSL 3.0 is deprecated so we are in the progress of working on a PKCS#11 provider for OpenSSL. This commit introduces a conditional build with the pkcs11-provider support (instead of engines) with all the changes required for the provider to work with existing code and tests. The CI modification is only temporary before we will have the real package in Fedora or somewhere to use. Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com>
2023-02-07fixed argp missing errorAhsen Kamal1-2/+4
Signed-off-by: Ahsen Kamal <itsahsenkamal@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2023-02-07ignored gcovr parse errorAhsen Kamal1-1/+1
Signed-off-by: Ahsen Kamal <itsahsenkamal@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2023-01-09cmake: Check for Argp also on Linux to fix alpine buildJakub Jelen1-3/+1
This adjusts also usage of ARGP_LIBRARY to use ARGP_LIBRARIES which is defined by the FindArgp module, unlike the former one in case it is provided by libc directly. Fixes: #167 Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <npocs@redhat.com>
2022-10-31ConfigureChecks.cmake: Remove implicitly included function checksNorbert Pocs1-1/+1
Removing support for older openssl versions than 1.1.1 makes some functions implicitly included; we do not have to check the availability of these functions. Signed-off-by: Norbert Pocs <npocs@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2022-09-22cmake: Fix pkgconfig path relocation in mingwBiswapriyo Nath1-1/+1
This fixes patch relocation of the output of pkgconfig by adding missing keywords like prefix, exec_prefix, libdir and includedir. The pkgconfig output changes are like following: * Before: $ pkg-config -libs libssh -lssh * After: $ pkg-config -libs libssh -LF:/msys64/ucrt64/lib -lssh See https://people.freedesktop.org/~dbn/pkg-config-guide.html for further documentation. Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2022-08-25Implement code coverage collectionJakub Jelen1-1/+16
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2022-07-07cmake: Bump version to 0.10.90Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2022-07-07Bump version to 0.10.0Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2022-07-02API: Bump SO version to 4.9.0Andreas Schneider1-2/+2
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2022-06-20CYGWIN provides an implemention of libargp as a separate package: Carlo Bramini1-2/+2
https://cygwin.com/cgi-bin2/package-grep.cgi?grep=libargp&arch=x86_64 The current CMakeLists.txt already provides the detection of this library for BSD/SOLARIS/OSX, so CYGWIN can be easily added there for support. Signed-off-by: Carlo Bramini <carlo_bramini@users.sourceforge.net> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2021-09-29cmake: Install pkgconfig file in MinGWBiswapriyo Nath1-2/+2
Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2021-02-15cmake: Support build directories with special charactersDDoSolitary1-2/+2
Signed-off-by: DDoSolitary <DDoSolitary@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2020-12-22Require at least OpenSSL 1.0.1Dirkjan Bussink1-1/+1
This is now the minimum version, so check it in the CMake configuration. Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2020-12-14Fix CMake warning about mismatched if/endif arguments during OpenSSL detectionKevin Kane1-1/+1
Signed-off-by: Kevin Kane <kkane@microsoft.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2020-12-10Provide OPENSSL_CRYPTO_LIBRARIES synonym for OPENSSL_CRYPTO_LIBRARYKevin Kane1-1/+7
FindOpenSSL.cmake usually defines this synonym, but it doesn't on CMake < 3.16 when building on Windows outside of Cygwin. Signed-off-by: Kevin Kane <kkane@microsoft.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2020-09-02ConfigureChecks.cmake: Disable HAVE_DSA by default (when mbedTLS is not enabled)Sahana Prasad1-0/+1
Ensure that it is not possible to enable it back with mbedTLS Signed-off-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2020-05-05Add basic support for none cipher and MACsJakub Jelen1-0/+1
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-12-20cmake: Add cmake module to find softhsmSahana Prasad1-0/+7
Signed-off-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-12-20cmake: Add new option for PKCS11 URI supportSahana Prasad1-0/+1
Signed-off-by: Sahana Prasad <sahana@redhat.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-11-07cmake: Add option to build shared libsAndreas Schneider1-0/+1
See https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2019-11-07cmake: Remove WITH_STATIC_LIBAndreas Schneider1-1/+0
We will honor BUILD_SHARED_LIBS from cmake next. Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2019-10-25cmake: Link compile database to source dir for clangdAndreas Schneider1-0/+5
See https://github.com/ycm-core/YouCompleteMe https://github.com/abingham/emacs-ycmd Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-07-04cmake: Write libssh-config.cmake using EXPORTSAndreas Schneider1-7/+0
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2019-07-04cmake: Use GNUInstallDirs for installationAndreas Schneider1-7/+6
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2019-06-14Bump SO version to 4.8.1Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
2019-06-13cmake: Bump API version to 4.8.0David Wedderwille1-1/+1
Fixes T153 Signed-off-by: David Wedderwille <davidwe@posteo.de> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-05-14cmake,options: Allow to set global client config fileAnderson Toshiyuki Sasaki1-0/+1
This allows the global client (ssh_session) configuration file path to be set in configuration time by defining GLOBAL_CLIENT_CONFIG when calling cmake. If it is not defined, the default path is set as "/etc/ssh/ssh_config". usage example: $ cmake -DGLOBAL_CLIENT_CONFIG=/etc/my/custom/path .. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-04-01cmake,options: Allow to set global bind config fileAnderson Toshiyuki Sasaki1-0/+3
This allows the global bind configuration file path to be set in configuration time by defining the GLOBAL_BIND_CONFIG when calling cmake. If no value is defined, the default path is set as "/etc/ssh/libssh_server_config". usage example: $ cmake -DGLOBAL_BIND_CONFIG=/etc/my/custom/path .. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-02-07cmake: Bump API version to 4.7.4Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2019-02-07Allow building without Group Exchange supportJakub Jelen1-0/+1
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-12-24Bump SO version to 4.7.3Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-12-19crypto: Disable blowfish support by defaultAndreas Schneider1-0/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2018-11-28tests: Replace tests filtering with cmocka builtin filterAnderson Toshiyuki Sasaki1-3/+6
This completely removes the tests filter code from torture.c and calls cmocka_set_test_filter() instead, if available. The checks for required libraries, headers, and the availability of cmocka_set_test_filter() were added to the cmake configuration. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-11-06cmake: Refresh the CMake Config filesChristophe Giboudeaux1-7/+17
This commit fixes a couple issues in the CMake configuration files and uses native features from CMake: * libssh-build-tree-settings.cmake is deleted. There was a typo that made this file unusable, anyway. * use the macros available in CMakePackageConfigHelpers.cmake to generate the version file and check that the files exist * Remove the LIBSSH_THREADS_LIBRARY variable, it used the non-existent LIBSSH_THREADS_LIBRARY_NAME variable. * Fix the in tree build. libssh can be used uninstalled again. Test plan: The values were tested after installing the new files and also without running 'make install'. Signed-off-by: Christophe Giboudeaux <christophe@krop.fr>
2018-10-29Bump SO version to 4.7.2Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-10-16Bump ABI to 4.7.1Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-20cmake: Bump library versionAndreas Schneider1-1/+1
2018-09-05cmake: Move CompilerFlags to own fileAndreas Schneider1-0/+1
They need to be included before the project() call. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-05cmake: Update defaultsAndreas Schneider1-4/+8
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-30cmake: Set version to 0.8.90Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-29Bump library version to 4.6.0Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-08-29cmake: Fix final map generationAndreas Schneider1-3/+3
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>