summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenSSL.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Find*: Update *_FOUND variablesPeter Kokot2025-09-231-3/+11
| | | | | | | | | | | | | | | | | | | | | This marks all `<PACKAGENAME>_FOUND` result variables as deprecated where possible (for `<PackageName>` find modules) to make it clearer which variable to use. In CMake 3.3, the FindPackageHandleStandardArgs module was refactored to set both `<PackageName>_FOUND` and uppercase `<PACKAGENAME>_FOUND` result variables to the same values. Before that, the FOUND_VAR argument could be used to set the result variable. * FindMatlab: Uppercased MATLAB_FOUND is not mentioned as it was never documented. * Documentation for FindPythonInterp and FindPythonLibs modules synced accordingly to their deprecation (3.12 instead of 4.2). * OPENGL_FOUND: deprecation version synced with other find modules. * DevIL_FOUND was introduced in CMake 3.8. The uppercased variant not mentioned as it was previously never documented. Fixes: #27242
* FindPkgConfig: Deprecate PKG_CONFIG_FOUNDPeter Kokot2025-08-201-1/+1
| | | | | | | | | | Since most of the find modules use the `<PackageName>_FOUND` result variables, this now also syncs it for the FindPkgConfig module. The `PkgConfig_FOUND` result variable is available since CMake 3.3 and contains the same value. There is also `PKGCONFIG_FOUND` result variable automatically set with the same value but for simplicity isn't documented. The uppercased `<PACKAGENAME>_FOUND` result variables set by find modules are also considered legacy variables.
* FindOpenSSL: Add OpenSSL_VERSIONPeter Kokot2025-08-041-10/+38
| | | | | | This deprecates the OPENSSL_VERSION result variable. Issue: #27088
* FindOpenSSL: Add support for ARM64 Windows pre-built binariesMatej Kenda2025-06-181-2/+8
| | | | Shining Light Productions now provides OpenSSL binaries for windows-arm64.
* FindOpenSSL: Refactor architecture-specific suffix tableMatej Kenda2025-06-181-6/+6
| | | | Do not assume all suffixes start with `x`.
* FindOpenSSL: Fix version range documentation notePeter Kokot2025-04-131-1/+1
| | | | Handling version ranges in FindOpenSSL was added in CMake 3.20.
* FindOpenSSL: Update documentationPeter Kokot2025-04-071-52/+104
| | | | | | | | - Added examples section. - Synced module descriptions a bit with other find modules. - OpenSSL_FOUND variable used. The OPENSSL_FOUND is also set by the find_package_handle_standard_args() to the same value. - Described the applink interface a bit further.
* LICENSE: Replace references to Copyright.txt with LICENSE.rstKitware Robot2025-03-031-1/+1
| | | | | | | | | | ``` git grep -lz 'Copyright.txt or https://cmake.org/licensing ' | while IFS= read -r -d $'\0' f ; do sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / { s/Copyright.txt/LICENSE.rst/ }' "$f" ; done ```
* Modules: Use math() for hex to decimal conversionNikita Nemkin2025-02-031-36/+3
| | | | math() can parse hex numbers prefixed with "0x" since 3.13.
* Modules/Find*: Include FindPackageHandleStandardArgs normallyBrad King2025-01-301-1/+1
| | | | | | | Since commit d74210a8bd (CMP0017: Remove support for OLD behavior, 2024-11-17) we can rely on CMP0017's NEW behavior unconditionally. Calling `include(FindPackageHandleStandardArgs)` in a builtin module will always get the builtin `FindPackageHandleStandardArgs`.
* Modules: Guard calls to pkg_check_modulesKai Pastor2024-08-071-1/+3
| | | | | | | | Before calling pkg_check_modules, modules must check PKG_CONFIG_FOUND. When FindPkgConfig.cmake is loaded, pkg_check_modules is always defined regardless of pkg-config being present. However, the whole module might be disabled on user request with CMAKE_DISABLE_FIND_PACKAGE_PkgConfig. This must not break Find modules which just look for a hint or similar.
* Merge topic 'FindOpenSSL-SLP-layout'Brad King2024-04-041-4/+8
|\ | | | | | | | | | | | | | | 9ff5dae3f6 FindOpenSSL: Update layout for Shining Light Productions debug libraries aa86f487c2 FindOpenSSL: Update layout for Shining Light Productions 32-bit package Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9402
| * FindOpenSSL: Update layout for Shining Light Productions debug librariesMatthias Isele2024-04-031-0/+2
| | | | | | | | | | | | | | The installer no longer names debug libraries with a `d` suffix. They are distinguished by the per-runtime-library directory containing them. Fixes: #25856
| * FindOpenSSL: Update layout for Shining Light Productions 32-bit packageMatthias Isele2024-04-031-4/+6
| | | | | | | | Issue: #25856
* | Modules: Fix CMP0159 warnings in modules when tracingJuan Ramos2024-03-291-0/+5
|/ | | | Closes: #25829
* FindOpenSSL: Update layout for Shining Light Productions package on WindowsMatthias Isele2024-02-231-6/+20
| | | | Fixes: #25702
* FindOpenSSL: Prefer OPENSSL_ROOT_DIR only if non-emptyBrad King2023-07-201-1/+1
| | | | | | | | | | Since commit 5cc8a69867 (FindOpenSSL: Trust the user's OPENSSL_ROOT_DIR, 2023-05-17, v3.27.0-rc1~71^2) we use `OPENSSL_ROOT_DIR` whenever it is defined, even if it is an empty string. This breaks a pattern in existing projects that define an empty `OPENSSL_ROOT_DIR` cache entry so that `cmake-gui` users can fill it in. Use the value only if non-empty. Issue: #18352
* Merge topic 'FindOpenSSL-deps'Brad King2023-05-231-3/+3
|\ | | | | | | | | | | | | | | f7e1e0545f FindOpenSSL: Enable static library dependencies on more platforms Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Jürg Billeter <j@bitron.ch> Merge-request: !8497
| * FindOpenSSL: Enable static library dependencies on more platformsBrad King2023-05-191-3/+3
| | | | | | | | | | | | | | | | Activate the logic from commit 8098bd5768 (FindOpenSSL: add pthread and dl dependencies to static lib on Linux, 2019-09-13, v3.16.0-rc1~72^2) on more UNIX platforms. Fixes: #24870
* | codespell: Fix typosBrad King2023-05-221-1/+1
| |
* | FindOpenSSL: Trust the user's OPENSSL_ROOT_DIRRichard Levitte2023-05-191-10/+8
|/ | | | | | | | When the user has specified the OpenSSL installation root directory, through the variable OPENSSL_ROOT_DIR or the environment variable with the same name, trust it, don't try to find OpenSSL anywhere else. Fixes: #18352
* FindOpenSSL: Fix finding header files and static libraries on MinGWمهدي شينون (Mehdi Chinoune)2023-04-051-2/+2
| | | | | | | * Avoid searching in the `Program Files` folder because the official OpenSSL is built for the MSVC ABI, and so is not compatible with MinGW. * Static libraries on MinGW has `.a` extension.
* FindOpenSSL: Search for -pthread flagKyle Edwards2023-02-231-1/+14
| | | | | | | | | Because -pthread doesn't begin with -l, it doesn't show up in the pkgconfig LIBRARIES variable, causing FindOpenSSL to not add the Threads::Threads dependency. Explicitly search LDFLAGS_EXTRA for -pthread and add the dependency if it's found. Fixes: #24532
* FindOpenSSL: Fix regression in dependency on threadsBrad King2023-02-201-6/+14
| | | | | | | | | Since commit 1b7804edd0 (FindOpenSSL: use extra dependencies from pkg-config as well, 2022-12-05, v3.26.0-rc1~227^2) we conditionally find Threads but unconditionally depend on it. Make the conditions consistent. Fixes: #24505
* FindOpenSSL: Use static pkgconfig if OPENSSL_USE_STATIC_LIBS=ONKyle Edwards2023-02-071-2/+8
| | | | Fixes: #24395
* FindOpenSSL: use extra dependencies from pkg-config as wellRolf Eike Beer2022-12-051-4/+38
| | | | This is important if OpenSSL is linked against an external zlib.
* FindOpenSSL: Search "lib64" for mingw 64-bit installsklytje2022-11-071-0/+2
|
* FindOpenSSL: Document use of pkg-configtofraa2022-07-051-0/+5
| | | | Issue: #17548
* FindOpenSSL: Reformat hints documentation as definition listBrad King2022-07-051-5/+12
|
* FindOpenSSL: Set version variables for version >= 3.0.0James Calo2022-06-021-0/+8
| | | | | | The variables `OPENSSL_VERSION_MAJOR`, `OPENSSL_VERSION_MINOR` and `OPENSSL_VERSION_FIX` are now set to the correct values when using OpenSSL version >= 3.0.0, which uses a new format.
* FindOpenSSL: Support version 1.1.1 under QNX 7.0Georg Lutz2022-05-061-3/+19
| | | | | QNX 7.0 allows parallel installation of OpenSSL 1.0.2 and OpenSSL 1.1.1. The 1.1.1 version has "1_1" appended to the include dir and library names.
* FindOpenSSL: Fix ws2 reference on WinCEleha-bot2022-01-281-1/+5
| | | | Fixes: #23070
* Merge topic 'FindOpenSSL-applink'Brad King2021-12-071-1/+1
|\ | | | | | | | | | | | | 586d483983 FindOpenSSL: Fix typo in applink condition Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6787
| * FindOpenSSL: Fix typo in applink conditionBrad King2021-12-061-1/+1
| | | | | | | | | | | | | | In commit 7b83ca816a (FindOpenSSL: add target OpenSSL::applink to support OpenSSL's applink feature, 2020-05-12, v3.18.0-rc1~150^2) the version check was written as "major.major.fix" instead of "major.minor.fix".
* | FindOpenSSL: Search in lib64 directories on non-Windows platformsBrad King2021-12-061-2/+2
|/ | | | | | | | The upstream `openssl` build system may install libraries to `lib64` even on platforms whose conventions do not use `lib64` for distro-packaged libraries. Fixes: #22945
* FindOpenSSL: Link with ws2_32 and crypt32 on Windows/staticOrgad Shaneh2021-06-071-0/+4
|
* FindOpenSSL: Add support for version-rangeDeniz Bahadir2021-02-011-0/+8
|
* FindOpenSSL: Distinguish 32-bit and 64-bit search paths on WindowsMa Br2020-12-211-5/+19
| | | | Fixes: #21611
* Help: Add `.. versionadded` directives to module docsNikita Nemkin2020-12-021-2/+15
| | | | Issue: #19715
* FindOpenSSL: Add support for finding static librariesSylvain Corlay2020-08-131-0/+50
| | | | Fixes: #20903
* Fix typos identified using codespellJean-Christophe Fillion-Robin2020-07-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/codespell-project/codespell#readme The following command was used: ``` codespell -q6 --skip="\ .git,\ *.json,\ ./Copyright.txt,\ ./Help/command/foreach.rst,\ ./Help/prop_test/REQUIRED_FILES.rst,\ ./Help/variable/CTEST_COVERAGE_COMMAND.rst,\ ./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\ ./Modules/CMakeRCInformation.cmake,\ ./Modules/Internal/CPack/NSIS.template.in,\ ./Modules/FindMatlab.cmake,\ ./Modules/MatlabTestsRedirect.cmake,\ ./Modules/Platform/Windows-Clang.cmake,\ ./Modules/Platform/Windows-Intel-Fortran.cmake,\ ./Modules/Platform/Windows-MSVC.cmake,\ ./Source/CMakeVersion.cmake,\ ./Source/cmConvertMSBuildXMLToJSON.py,\ ./Source/cmCreateTestSourceList.cxx,\ ./Source/cmGlobalVisualStudio10Generator.cxx,\ ./Source/cmExportBuildFileGenerator.cxx,\ ./Source/cmExportInstallAndroidMKGenerator.cxx,\ ./Source/cmExportInstallFileGenerator.cxx,\ ./Source/cmExportSet.cxx,\ ./Source/cmExportTryCompileFileGenerator.cxx,\ ./Source/cmFindPackageCommand.cxx,\ ./Source/cmInstallCommand.cxx,\ ./Source/cmGeneratorExpressionLexer.cxx,\ ./Source/cmLocalVisualStudio7Generator.cxx,\ ./Source/cmOrderDirectories.cxx,\ ./Source/cmTarget.cxx,\ ./Source/kwsys/*,\ ./Source/QtDialog/CMakeSetupDialog.ui,\ ./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\ ./Source/CTest/cmParseCoberturaCoverage.h,\ ./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\ ./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\ ./Tests/RunCMake/GoogleTest/xml_output.cpp,\ ./Tests/RunCMake/Make/TargetMessages*,\ ./Utilities/*,\ " \ -L "\ dependees,\ endwhile,\ fo,\ filetest,\ helpfull,\ nd,\ objext,\ stoll,\ supercedes,\ superceded,\ vas,\ varn,\ " ```
* Merge topic 'FindOpenSSL-3.0'Brad King2020-06-091-2/+4
|\ | | | | | | | | | | | | 796b447373 FindOpenSSL: Fix OpenSSL 3.0.0 version extraction Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4860
| * FindOpenSSL: Fix OpenSSL 3.0.0 version extractionBilly Brumley2020-06-081-2/+4
| | | | | | | | | | | | | | | | Fix the regex syntax added by commit 61d746e592 (FindOpenSSL: Detect OpenSSL 3.0.0, 2020-05-27, v3.17.3~1^2). Add missing escapes. Test with `openssl-3.0.0-alpha3`. While at it, also unset a temporary variable after use.
* | Merge topic 'openssl-3.0.0'Brad King2020-05-281-0/+9
|\ \ | |/ | | | | | | | | | | 61d746e592 FindOpenSSL: Detect OpenSSL 3.0.0 Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4805
| * FindOpenSSL: Detect OpenSSL 3.0.0Vitezslav Cizek2020-05-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | The OpenSSL versioning is changing with the upcoming 3.0.0 release. https://www.openssl.org/blog/blog/2018/11/28/version/ Since 3.0.0, the patch letters are being dropped. The new format is: MAJOR.MINOR.PATCH The OPENSSL_VERSION variable can now be directly derived from the new OPENSSL_VERSION_STR macro. https://www.openssl.org/docs/manmaster/man3/OPENSSL_VERSION_NUMBER.html
* | FindOpenSSL: add target OpenSSL::applink to support OpenSSL's applink featuregnaggnoyil2020-05-151-0/+47
|/ | | | Fixes: #20701
* FindOpenSSL: do not mark a local variable as advancedBen Boeckel2020-01-201-1/+1
|
* FindOpenSSL: Fix ordering of dependency link flagsAshley Whetter2019-12-311-7/+5
| | | | Fixes: #20082
* FindOpenSSL: Lookup all pkg-config directoriesDenis Thulin2019-11-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using a custom sysroot to build things using pkg-config, some of the output variables feature the sysroot while others do not: ```console $ export PKG_CONFIG_SYSROOT_DIR=/path/to/sysroot $ export PKG_CONFIG_LIBDIR=/path/to/sysroot/usr/lib/pkgconfig $ pkg-config --cflags-only-I openssl -I/path/to/sysroot/usr/include/ $ pkg-config --variable=includedir openssl /usr/include $ pkg-config --libs-only-L openssl -L/path/to/sysroot/usr/lib $ pkg-config --variable=libdir openssl /usr/lib ``` When using `pkg_check_modules`, it's pretty much the same: ```cmake pkg_check_modules(_OPENSSL QUIET openssl) _OPENSSL_INCLUDE_DIRS == /path/to/sysroot/usr/include/ _OPENSSL_INCLUDEDIR == /usr/include _OPENSSL_LIBRARY_DIRS == -L/path/to/sysroot/usr/lib _OPENSSL_LIBDIR == /usr/lib ``` However, FindOpenSSL only searches for headers in `INCLUDEDIR` and libraries in `LIBDIR` instead of searching `INCLUDE_DIRS` and `LIBRARY_DIRS` as well. This fixes that behaviour. Fixes: #16885 Signed-off-by: Denis Thulin <denis.thulin@enyx.fr>
* FindOpenSSL: add pthread and dl dependencies to static lib on LinuxDavid Callu2019-09-201-5/+43
|