summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenSSL.cmake
Commit message (Collapse)AuthorAgeFilesLines
* FindOpenSSL: Search in more-specific directories before less-specificBrad King2016-09-221-6/+6
| | | | | | | | | | | Since commit v3.6.0-rc1~182^2 (FindOpenSSL: Prefer libs early in search path regardless of name, 2016-04-04) we use the `NAMES_PER_DIR` option to `find_library` calls to consider all names in each directory before moving on to the next directory. Fix our library search directory ordering to place more-specific (e.g. VC/) directories before the general directories. Otherwise they may never be considered. Closes: #16320
* FindOpenSSL: Fix detection of OpenSSL 1.1 Win32/64Alexis Murzeau2016-08-301-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since OpenSSL 1.1.0, Windows binaries are libcrypto and libssl instead of the old names libeay32 and ssleay32. When using MSVC, FindOpenSSL was searching for the old lib names only so this add the new names to be able to find OpenSSL 1.1.0 libraries. For example, the files in lib directory of OpenSSL 1.1.0 Win64 : - libcrypto.lib - libssl.lib - VC/libcrypto64MD.lib - VC/libcrypto64MDd.lib - VC/libcrypto64MT.lib - VC/libcrypto64MTd.lib - VC/libssl64MD.lib - VC/libssl64MDd.lib - VC/libssl64MT.lib - VC/libssl64MTd.lib 32 bits OpenSSL has the same files with "32" instead of "64" for files in VC directory. MinGW still works and use lib/libcrypto.lib and lib/libssl.lib. This patch also add libssl and libcrypto for other windows compilers too (like Intel).
* Modules: Make imported targets fall back to `Release`Brad King2016-08-031-14/+14
| | | | | | | | | | | | Find modules only detect Debug and Release configurations. All other configurations will fall back to the configuration listed as the first entry in `IMPORTED_CONFIGURATIONS`. Switch the order so that `Release` is listed first, as this is a better fallback than `Debug` for the `RelWithDebInfo` and `MinSizeRel` configurations. See issue #16091. This approach is recommended by documentation in `cmake-developer(7)` added by commit v3.2.0-rc1~286^2~1 (Help: Document IMPORTED_CONFIGURATIONS target property for Find modules, 2014-12-04).
* FindOpenSSL: Do not assume that the version regex finds somethingVladimír Vondruš2016-06-091-4/+4
| | | | BoringSSL's openslv.h does not have the version information.
* FindOpenSSL: Prefer libs early in search path regardless of name (#15887)Hannes Mezger2016-04-051-0/+10
| | | | | | | Add NAMES_PER_DIR to all find_library invocations so that we consider all possible names in each search directory before moving on to the next directory. Otherwise we may not find self-built libraries first even if they appear early in the search path.
* FindOpenSSL: Search for unix-named libraries first on MinGW (#15765)Wayne Stambaugh2015-10-061-6/+2
| | | | | | | | Generalize the change made by commit v2.8.10~228^2~4 (FindOpenSSL: find cross-compiled OpenSSL from MinGW, 2012-07-23) to be used on builds hosted on Windows too. When building for MinGW, consider library names that come with MinGW before looking for the main Windows distribution of OpenSSL.
* FindOpenSSL: Tolerate tabs in header while parsing version (#15765)Wayne Stambaugh2015-10-061-1/+1
| | | | Tolerate tabs instead of spaces in the "# define" line.
* FindOpenSSL: Add support for static MSVC runtimeThijs Wenker2015-10-051-5/+12
| | | | | Add an OPENSSL_MSVC_STATIC_RT option to switch from the default search for `/MD` libraries to look for `/MT` libraries instead.
* FindOpenSSL: Optionally search only for static librariesThijs Wenker2015-09-021-5/+30
| | | | | | | Add an OPENSSL_USE_STATIC_LIBS option to enable it. Adjust CMAKE_FIND_LIBRARY_SUFFIXES to only look for .a and .lib files. Also adjust the search paths on Windows for installer locations of static libraries.
* FindOpenSSL: Provide imported targets OpenSSL::{SSL,Crypto}Konstantin Podsvirov2015-08-131-0/+73
|
* FindOpenSSL: Revise and format module documentationBrad King2015-08-131-15/+19
| | | | Improve reStructuredText formatting and add section headers.
* FindOpenSSL: De-duplicate find_library path suffixes on WindowsThijs Wenker2015-07-301-12/+11
| | | | | Store the path suffixes in a variable and reference it in each find_library call.
* FindOpenSSL: Remove extra whitespaceThijs Wenker2015-07-301-9/+9
|
* Merge topic 'OpenSSL_102'Brad King2015-01-281-1/+1
|\ | | | | | | | | c5d9a828 FindOpenSSL: fix detection of OpenSSL 1.0.2
| * FindOpenSSL: fix detection of OpenSSL 1.0.2Guillaume Belz2015-01-271-1/+1
| |
* | FindOpenSSL: Always extract version from detected header (#15075)Aku Kotkavuo2015-01-111-3/+1
| | | | | | | | | | Do not use the _OPENSSL_VERSION computed by pkg-config because the user may change OPENSSL_INCLUDE_DIR.
* | FindOpenSSL: Report crypto and ssl libraries separatelyHannes Mezger2014-12-011-4/+12
|/ | | | | | | | Some applications only need the OpenSSL crypto library and want to avoid linking against the SSL library. Set OPENSSL_CRYPTO_LIBRARY and OPENSSL_SSL_LIBRARY in the code paths that do not need to find them separately, and document them publicly. This allows applications to be more specific when linking against OpenSSL.
* FindOpenSSL: Prefer OPENSSL_ROOT_DIR first (#14764)Ho Cheung2014-02-181-5/+5
| | | | | Use hints computed from this explicit variable before those computed by PkgConfig. They are more specific.
* FindOpenSSL: Honor OPENSSL_ROOT_DIR everywhere (#14735)Ho Cheung2014-02-051-4/+5
| | | | | | In commit v2.8.5~176^2~2 (FindOpenSSL: We should only use hints to find OpenSSL, 2011-03-28) values for HINTS and PATHS of find_* calls were computed everywhere but only used on Windows. Use them everywhere.
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-6/+18
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* FindOpenSSL: mark variables as advanced for MSVC (#14418)Rolf Eike Beer2013-09-171-0/+2
|
* Merge topic 'doc-improvements'Brad King2013-05-161-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 7cc2805 Docs: Clarify wording "flag used" => "flag (to|will) be used" 2378a69 Docs: Clarify that CMAKE_*_(PREFIX|SUFFIX) affect filenames 56ca34d Docs: Update description of CMAKE_(BUILD_TYPE|CONFIGURATION_TYPES) 2bab472 VS10: add detailed comment about MIDL processing e619111 Explain distribution of Win9x binary on all Windows versions. 5ca4336 FindwxWidgets: add DOC strings with usual style f57800d Fix spelling and typos (product names) bf019d7 Fix spelling and typos (non-binary) ddac8d3 Fix spelling and typos (affecting binary data / module messages) 86832ce Fix spelling and typos (affecting users)
| * Fix spelling and typos (product names)Andreas Mohr2013-05-071-1/+1
| | | | | | | | API, Borland, MinGW, UNIX, Mac OS X.
* | FindOpenSSL: Fix spelling of CMAKE_CROSSCOMPILING (#14075)Robin Lee2013-04-121-1/+1
|/ | | | | | Use of the mis-spelled variable name 'CMAKE_CROSS_COMPILING' was introduced by commit 4b793ad1 (FindOpenSSL: find cross-compiled OpenSSL from MinGW, 2012-07-23). Fix the spelling.
* FindOpenSSL: also find the non-MD debug libraries for MSVCRolf Eike Beer2012-11-051-0/+2
| | | | We already search for them in release mode.
* FindOpenSSL: fix library selection on Windows (#13645)Rolf Eike Beer2012-11-051-0/+5
|
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-11/+11
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-40/+40
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* FindOpenSSL: remove leftover commentRolf Eike Beer2012-07-291-1/+0
|
* FindOpenSSL: cleanup path hintsRolf Eike Beer2012-07-291-19/+28
| | | | | | -only use Windows-specific paths on Windows -recode the contents of $ENV{PROGRAMFILES} to be a valid CMake path before using it
* FindOpenSSL: let CMake handle environment variable HINTSRolf Eike Beer2012-07-291-1/+1
| | | | This will automatically make sure the paths will get recoded to proper separators on Windows
* FindOpenSSL: use SelectLibraryConfigurationsRolf Eike Beer2012-07-291-13/+5
|
* FindOpenSSL: find cross-compiled OpenSSL from MinGW (#13431)Rolf Eike Beer2012-07-291-2/+10
| | | | Suggested-by: Dominik Schmidt <dev@dominik-schmidt.de>
* FindOpenSSL: properly parse the hex version componentsRolf Eike Beer2012-01-271-4/+36
|
* Merge topic 'use-pkgconfig-quiet'David Cole2012-01-251-4/+2
|\ | | | | | | | | ede3ec5 use pkg_check_modules() quiet in other modules
| * use pkg_check_modules() quiet in other modulesRolf Eike Beer2012-01-231-4/+2
| | | | | | | | | | Those modules will already print what they found or not using FPHSA, no need to do this twice.
* | FindOpenSSL: also parse version number define with uppercase lettersRolf Eike Beer2012-01-171-2/+2
| |
* | FindOpenSSL: only try to parse opensslv.h if it existsRolf Eike Beer2012-01-171-1/+1
| |
* | FindOpenSSL: improve version number handlingRolf Eike Beer2012-01-131-8/+32
|/ | | | | | | First this fixes the bug that e.g. version "1.0.0" was shown as "1..". When pkg-config was used to find OpenSSL the header file was parsed for the version number even if pkg-config returned it already. Finally we also include the patch level (i.e. the letter after the version number) in OPENSSL_VERSION.
* FindOpenSSL: Use find_package_handle_standard_args for version check.Andreas Schneider2011-03-311-20/+20
|
* FindOpenSSL: Fixed crypto und ssl variable names.Andreas Schneider2011-03-311-4/+8
|
* FindOpenSSL: We should only use hints to find OpenSSL.Andreas Schneider2011-03-311-38/+93
|
* FindOpenSSL: Added support for pkg-config.Andreas Schneider2011-03-281-10/+45
|
* This commit fixes bug #0010316Mathieu Malaterre2011-03-281-10/+43
|
* Modules: Include builtin FindPackageHandleStandardArgs directlyBrad King2011-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FindPackageHandleStandardArgs module was originally created outside of CMake. It was added for CMake 2.6.0 by commit e118a627 (add a macro FIND_PACKAGE_HANDLE_STANDARD_ARGS..., 2007-07-18). However, it also proliferated into a number of other projects that at the time required only CMake 2.4 and thus could not depend on CMake to provide the module. CMake's own find modules started using the module in commit b5f656e0 (use the new FIND_PACKAGE_HANDLE_STANDARD_ARGS in some of the FindXXX modules..., 2007-07-18). Then commit d358cf5c (add 2nd, more powerful mode to find_package_handle_standard_args, 2010-07-29) added a new feature to the interface of the module that was fully optional and backward compatible with all existing users of the module. Later commit 5f183caa (FindZLIB: use the FPHSA version mode, 2010-08-04) and others shortly thereafter started using the new interface in CMake's own find modules. This change was also backward compatible because it was only an implementation detail within each module. Unforutnately these changes introduced a problem for projects that still have an old copy of FindPackageHandleStandardArgs in CMAKE_MODULE_PATH. When any such project uses one of CMake's builtin find modules the line include(FindPackageHandleStandardArgs) loads the copy from the project which does not have the new interface! Then the including find module tries to use the new interface with the old module and fails. Whether this breakage can be considered a backward incompatible change in CMake is debatable. The situation is analagous to copying a standard library header from one version of a compiler into a project and then observing problems when the next version of the compiler reports errors in its other headers that depend on its new version of the original header. Nevertheless it is a change to CMake that causes problems for projects that worked with previous versions. This problem was discovered during the 2.8.3 release candidate cycle. It is an instance of a more general problem with projects that provide their own versions of CMake modules when other CMake modules depend on them. At the time we resolved this instance of the problem with commit b0118402 (Use absolute path to FindPackageHandleStandardArgs.cmake everywhere, 2010-09-28) for the 2.8.3 release. In order to address the more general problem we introduced policy CMP0017 in commit db44848f (Prefer files from CMAKE_ROOT when including from CMAKE_ROOT, 2010-11-17). That change was followed by commit ce28737c (Remove usage of CMAKE_CURRENT_LIST_DIR now that we have CMP0017, 2010-12-20) which reverted the original workaround in favor of using the policy. However, existing project releases do not set the policy behavior to NEW and therefore still exhibit the problem. We introduced in commit a364daf1 (Allow users to specify defaults for unset policies, 2011-01-03) an option for users to build existing projects by adding -DCMAKE_POLICY_DEFAULT_CMP0017=NEW to the command line. Unfortunately this solution still does not allow such projects to build out of the box, and there is no good way to suggest the use of the new option. The only remaining solution to keep existing projects that exhibit this problem building is to restore the change originally made in commit b0118402 (Use absolute path to FindPackageHandleStandardArgs.cmake everywhere, 2010-09-28). This also avoids policy CMP0017 warnings for this particular instance of the problem the policy addresses.
* Remove usage of CMAKE_CURRENT_LIST_DIR now that we have CMP0017Alex Neundorf2011-01-041-1/+1
| | | | | | | | This puts the new search behaviour for included files in action, i.e. now when a file from Modules/ include()s another file, it also gets the one from Modules/ included, i.e. the one it expects. Alex
* Use absolute path to FindPackageHandleStandardArgs.cmake everywhereAlex Neundorf2010-09-281-1/+1
| | | | | | | This is to avoid getting an (older) copy of FPHSA.cmake which is e.g. installed with KDE 4.5.0 and 4.5.1. Alex
* Fix 11035 : debug/release library configuration mistakeMathieu Malaterre2010-08-141-2/+2
| | | | Thanks to Dimitri Kaparis for report
* Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
|
* Add missing PATHS to find_path commands to fix openssl searchingMathieu Malaterre2010-07-271-9/+9
|