From f2586846661fd2ef1a999765108298ca41b57256 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 14 Jan 2006 20:15:30 +0000 Subject: -simple cmake modules for detecting libart, OpenSSL, FAM, jasper and PCRE -major improvement of am2cmake: add libtool .la files found in LIBADD to TARGET_LINK_LIBRARIES and fix the loop for adding the libs Alex svn path=/trunk/KDE/kdesdk/cmake/; revision=498154 --- modules/FindOpenSSL.cmake | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 modules/FindOpenSSL.cmake (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake new file mode 100644 index 00000000..8b6d6e5d --- /dev/null +++ b/modules/FindOpenSSL.cmake @@ -0,0 +1,26 @@ + +FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h +/usr/include/ +/usr/local/include/ +) + +FIND_LIBRARY(OPENSSL_LIBRARY NAMES ssl +PATHS +/usr/lib +/usr/local/lib +) + +IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARY) + SET(OPENSSL_FOUND TRUE) +ENDIF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARY) + + +IF(OPENSSL_FOUND) + IF(NOT OPENSSL_FIND_QUIETLY) + MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARY}") + ENDIF(NOT OPENSSL_FIND_QUIETLY) +ELSE(OPENSSL_FOUND) + IF(OPENSSL_FIND_REQUIRED) + MESSAGE(SEND_ERROR "Could not find OpenSSL") + ENDIF(OPENSSL_FIND_REQUIRED) +ENDIF(OPENSSL_FOUND) -- cgit v1.2.1 From f966ce265b1c469713f7c2543bb81e5cf8b70d13 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 23 Jan 2006 17:41:24 +0000 Subject: -fix Foo_FIND_REQUIRED and Foo_FIND_QUIETYL handling: Alex svn path=/trunk/KDE/kdesdk/cmake/; revision=501687 --- modules/FindOpenSSL.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 8b6d6e5d..1b13d63f 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -16,11 +16,11 @@ ENDIF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARY) IF(OPENSSL_FOUND) - IF(NOT OPENSSL_FIND_QUIETLY) + IF(NOT OpenSSL_FIND_QUIETLY) MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARY}") - ENDIF(NOT OPENSSL_FIND_QUIETLY) + ENDIF(NOT OpenSSL_FIND_QUIETLY) ELSE(OPENSSL_FOUND) - IF(OPENSSL_FIND_REQUIRED) + IF(OpenSSL_FIND_REQUIRED) MESSAGE(SEND_ERROR "Could not find OpenSSL") - ENDIF(OPENSSL_FIND_REQUIRED) + ENDIF(OpenSSL_FIND_REQUIRED) ENDIF(OPENSSL_FOUND) -- cgit v1.2.1 From 1d78fb83f0d0c05d0d0bd8b4bbb53747fc55778d Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 25 Jan 2006 20:41:54 +0000 Subject: add the stuff moved from kdesdk, maybe... Alex svn path=/trunk/KDE/kdelibs/; revision=502383 --- modules/FindOpenSSL.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 1b13d63f..f07908a0 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -21,6 +21,6 @@ IF(OPENSSL_FOUND) ENDIF(NOT OpenSSL_FIND_QUIETLY) ELSE(OPENSSL_FOUND) IF(OpenSSL_FIND_REQUIRED) - MESSAGE(SEND_ERROR "Could not find OpenSSL") + MESSAGE(FATAL_ERROR "Could not find OpenSSL") ENDIF(OpenSSL_FIND_REQUIRED) ENDIF(OPENSSL_FOUND) -- cgit v1.2.1 From 8ad0121573a771ded4fd6dccc754eb5cfd3661af Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Wed, 8 Feb 2006 19:46:50 +0000 Subject: add some libnames svn path=/trunk/KDE/kdelibs/; revision=507241 --- modules/FindOpenSSL.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index f07908a0..e5240905 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -4,7 +4,7 @@ FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h /usr/local/include/ ) -FIND_LIBRARY(OPENSSL_LIBRARY NAMES ssl +FIND_LIBRARY(OPENSSL_LIBRARY NAMES ssl ssleay32 PATHS /usr/lib /usr/local/lib -- cgit v1.2.1 From 75a07dd38b4a491a9d16d24492bea5c6ba90a8ff Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sun, 12 Feb 2006 14:38:04 +0000 Subject: -moved the cmake code to find kdewin32 out of FindKDE4.cmake and into its own FindKDEWIN32.cmake file -added a new FindGNUWIN32.cmake file, which tries to find the gnuwin32 base directory -changed all "FOO_LIBRARY" variable names to "FOO_LIBRARIES" to be more consistent with the other cmake modules -added a macro_getenv_win_path() which replaces all backslahes with slashes from environment variables -modified the kde4_add_kcfg_files() command, so that the generated header is also processed by moc -all tests compile and link Alex CCMAIL:kde-buildsystem@kde.org The changes to the windows stuff are untested, since I don't have a windows box. Please check that everything still works. Please have a look at FindGNUWIN32.cmake, there are probably ways to improve this. The resulting GNUWIN32_DIR variable is used in other cmake modules as default path to search for headers and libraries. svn path=/trunk/KDE/kdelibs/; revision=508648 --- modules/FindOpenSSL.cmake | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index e5240905..93625b4f 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -1,26 +1,35 @@ +# - Try to find the OpenSSL encryption library +# Once done this will define +# +# OPENSSL_FOUND - system has the OpenSSL library +# OPENSSL_INCLUDE_DIR - the OpenSSL include directory +# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h -/usr/include/ -/usr/local/include/ + /usr/include/ + /usr/local/include/ ) -FIND_LIBRARY(OPENSSL_LIBRARY NAMES ssl ssleay32 -PATHS -/usr/lib -/usr/local/lib +FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 + PATHS + /usr/lib + /usr/local/lib ) -IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARY) +IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) SET(OPENSSL_FOUND TRUE) -ENDIF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARY) +ENDIF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) IF(OPENSSL_FOUND) IF(NOT OpenSSL_FIND_QUIETLY) - MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARY}") + MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") ENDIF(NOT OpenSSL_FIND_QUIETLY) ELSE(OPENSSL_FOUND) IF(OpenSSL_FIND_REQUIRED) MESSAGE(FATAL_ERROR "Could not find OpenSSL") ENDIF(OpenSSL_FIND_REQUIRED) ENDIF(OPENSSL_FOUND) + +MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) + -- cgit v1.2.1 From ffc69376dc591eae7b0ed2e974a599fb1b8b2aa8 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 15 Feb 2006 10:47:36 +0000 Subject: Lowercase some common keywords to improve readability svn path=/trunk/KDE/kdelibs/; revision=509624 --- modules/FindOpenSSL.cmake | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 93625b4f..766cbc58 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -16,20 +16,20 @@ FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 /usr/local/lib ) -IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - SET(OPENSSL_FOUND TRUE) -ENDIF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +if(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + set(OPENSSL_FOUND TRUE) +endif(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) -IF(OPENSSL_FOUND) - IF(NOT OpenSSL_FIND_QUIETLY) - MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") - ENDIF(NOT OpenSSL_FIND_QUIETLY) -ELSE(OPENSSL_FOUND) - IF(OpenSSL_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find OpenSSL") - ENDIF(OpenSSL_FIND_REQUIRED) -ENDIF(OPENSSL_FOUND) +if(OPENSSL_FOUND) + if(not OpenSSL_FIND_QUIETLY) + message(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") + endif(not OpenSSL_FIND_QUIETLY) +else(OPENSSL_FOUND) + if(OpenSSL_FIND_REQUIRED) + message(FATAL_ERROR "Could not find OpenSSL") + endif(OpenSSL_FIND_REQUIRED) +endif(OPENSSL_FOUND) MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) -- cgit v1.2.1 From eaad615ee85800bedbf2088326399027c95d0740 Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 15 Feb 2006 10:49:53 +0000 Subject: Hmm, "NOT" can't be lowercased. I tested before lowercasing that last one, of course... svn path=/trunk/KDE/kdelibs/; revision=509625 --- modules/FindOpenSSL.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 766cbc58..7b9f7d55 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -22,12 +22,12 @@ endif(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) if(OPENSSL_FOUND) - if(not OpenSSL_FIND_QUIETLY) + if(NOT OpenSSL_FIND_QUIETLY) message(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") - endif(not OpenSSL_FIND_QUIETLY) + endif(NOT OpenSSL_FIND_QUIETLY) else(OPENSSL_FOUND) if(OpenSSL_FIND_REQUIRED) - message(FATAL_ERROR "Could not find OpenSSL") + message(FATAL_ERROR "Could NOT find OpenSSL") endif(OpenSSL_FIND_REQUIRED) endif(OPENSSL_FOUND) -- cgit v1.2.1 From 001e9abc40788b7fb5b7639c972a9b7eab449324 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Wed, 15 Feb 2006 20:36:22 +0000 Subject: find libraries in previously detected gnuwin32 package location svn path=/trunk/KDE/kdelibs/; revision=509911 --- modules/FindOpenSSL.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 7b9f7d55..9192924a 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -8,12 +8,14 @@ FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h /usr/include/ /usr/local/include/ + ${GNUWIN32_DIR}/include ) FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 PATHS /usr/lib /usr/local/lib + ${GNUWIN32_DIR}/lib ) if(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) -- cgit v1.2.1 From 088cfc6d44e9297e37ffdd5817aa2f62b4afbafb Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 16 Feb 2006 09:01:40 +0000 Subject: using GNUWIN32_DIR requires detecting of gnuwin32 package dir before svn path=/trunk/KDE/kdelibs/; revision=510062 --- modules/FindOpenSSL.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 9192924a..952d4c20 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -4,6 +4,7 @@ # OPENSSL_FOUND - system has the OpenSSL library # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL +FIND_PACKAGE(GNUWIN32) FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h /usr/include/ -- cgit v1.2.1 From 191846e3e21c697c28bd5c8a166edeb4072161e3 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Mon, 20 Mar 2006 21:05:37 +0000 Subject: minor cleanups: indenting, adding newline to end of file, etc. svn path=/trunk/KDE/kdelibs/; revision=520790 --- modules/FindOpenSSL.cmake | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 952d4c20..ada33cf0 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -19,20 +19,20 @@ FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ${GNUWIN32_DIR}/lib ) -if(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) set(OPENSSL_FOUND TRUE) -endif(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) -if(OPENSSL_FOUND) - if(NOT OpenSSL_FIND_QUIETLY) +if (OPENSSL_FOUND) + if (NOT OpenSSL_FIND_QUIETLY) message(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") - endif(NOT OpenSSL_FIND_QUIETLY) -else(OPENSSL_FOUND) - if(OpenSSL_FIND_REQUIRED) + endif (NOT OpenSSL_FIND_QUIETLY) +else (OPENSSL_FOUND) + if (OpenSSL_FIND_REQUIRED) message(FATAL_ERROR "Could NOT find OpenSSL") - endif(OpenSSL_FIND_REQUIRED) -endif(OPENSSL_FOUND) + endif (OpenSSL_FIND_REQUIRED) +endif (OPENSSL_FOUND) MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) -- cgit v1.2.1 From cba8933a83c2e96698b85b980438f30385f8420e Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Sat, 8 Apr 2006 22:43:16 +0000 Subject: optimized gnuwin32 detection on windows - find gnuwin32 package location very early - removed GNUWIN32_INCLUDE_DIR/GNUWIN32_LIBRARY_DIR macros, because FindGNUWIN32.cmake sets now CMAKE_INCLUDE_PATH and CMAKE_LIBRARY_PATH - don't use pkgconfig on windows svn path=/trunk/KDE/kdelibs/; revision=527634 --- modules/FindOpenSSL.cmake | 3 --- 1 file changed, 3 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index ada33cf0..5449f1f6 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -4,19 +4,16 @@ # OPENSSL_FOUND - system has the OpenSSL library # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL -FIND_PACKAGE(GNUWIN32) FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h /usr/include/ /usr/local/include/ - ${GNUWIN32_DIR}/include ) FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 PATHS /usr/lib /usr/local/lib - ${GNUWIN32_DIR}/lib ) if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) -- cgit v1.2.1 From 968fec0a7b604bb1c463aae6ff7bb9726407af72 Mon Sep 17 00:00:00 2001 From: David Faure Date: Fri, 14 Apr 2006 11:49:02 +0000 Subject: Actually use the cache whenever possible. Should speed up the re-configuring that happens so often. svn path=/trunk/KDE/kdelibs/; revision=529759 --- modules/FindOpenSSL.cmake | 64 +++++++++++++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 25 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 5449f1f6..bdc85685 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -5,31 +5,45 @@ # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL -FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h - /usr/include/ - /usr/local/include/ -) +IF (CACHED_OPENSSL) -FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 - PATHS - /usr/lib - /usr/local/lib -) + # in cache already + IF ("${CACHED_OPENSSL}" STREQUAL "YES") + SET(OPENSSL_FOUND TRUE) + ENDIF ("${CACHED_OPENSSL}" STREQUAL "YES") -if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - set(OPENSSL_FOUND TRUE) -endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - - -if (OPENSSL_FOUND) - if (NOT OpenSSL_FIND_QUIETLY) - message(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") - endif (NOT OpenSSL_FIND_QUIETLY) -else (OPENSSL_FOUND) - if (OpenSSL_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find OpenSSL") - endif (OpenSSL_FIND_REQUIRED) -endif (OPENSSL_FOUND) - -MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) +ELSE (CACHED_OPENSSL) + FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h + /usr/include/ + /usr/local/include/ + ) + + FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 + PATHS + /usr/lib + /usr/local/lib + ) + + if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + set(OPENSSL_FOUND TRUE) + set(CACHED_OPENSSL "YES") + else (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + set(CACHED_OPENSSL "NO") + endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + + + if (OPENSSL_FOUND) + if (NOT OpenSSL_FIND_QUIETLY) + message(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") + endif (NOT OpenSSL_FIND_QUIETLY) + else (OPENSSL_FOUND) + if (OpenSSL_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find OpenSSL") + endif (OpenSSL_FIND_REQUIRED) + endif (OPENSSL_FOUND) + + set(CACHED_OPENSSL ${CACHED_OPENSSL} CACHE INTERNAL "If openssl was checked") + MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) + +ENDIF (CACHED_OPENSSL) -- cgit v1.2.1 From 2b43aad081d13bdeb2ed8a65f65fbecfb470da0d Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 18 Apr 2006 11:22:38 +0000 Subject: More use of the cache; fixing previous commit to not recheck everytime when something isn't available (e.g. agg for me). svn path=/trunk/KDE/kdelibs/; revision=531000 --- modules/FindOpenSSL.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index bdc85685..fde22a84 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -5,14 +5,14 @@ # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL -IF (CACHED_OPENSSL) +IF (DEFINED CACHED_OPENSSL) # in cache already IF ("${CACHED_OPENSSL}" STREQUAL "YES") SET(OPENSSL_FOUND TRUE) ENDIF ("${CACHED_OPENSSL}" STREQUAL "YES") -ELSE (CACHED_OPENSSL) +ELSE (DEFINED CACHED_OPENSSL) FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h /usr/include/ @@ -46,4 +46,4 @@ ELSE (CACHED_OPENSSL) set(CACHED_OPENSSL ${CACHED_OPENSSL} CACHE INTERNAL "If openssl was checked") MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) -ENDIF (CACHED_OPENSSL) +ENDIF (DEFINED CACHED_OPENSSL) -- cgit v1.2.1 From a1cd53cff402332c1bcf7a625b33d9330a247608 Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 11 May 2006 16:56:59 +0000 Subject: Remove my CACHED_ hacks which break when people install libxml2 after seeing the error message about it - only use the cache when the check was previously successful, as discussed. svn path=/trunk/KDE/kdelibs/; revision=539759 --- modules/FindOpenSSL.cmake | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index fde22a84..ed2f4045 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -5,14 +5,12 @@ # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL -IF (DEFINED CACHED_OPENSSL) +if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) # in cache already - IF ("${CACHED_OPENSSL}" STREQUAL "YES") - SET(OPENSSL_FOUND TRUE) - ENDIF ("${CACHED_OPENSSL}" STREQUAL "YES") + SET(OPENSSL_FOUND TRUE) -ELSE (DEFINED CACHED_OPENSSL) +else (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h /usr/include/ @@ -27,12 +25,8 @@ ELSE (DEFINED CACHED_OPENSSL) if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) set(OPENSSL_FOUND TRUE) - set(CACHED_OPENSSL "YES") - else (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - set(CACHED_OPENSSL "NO") endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - if (OPENSSL_FOUND) if (NOT OpenSSL_FIND_QUIETLY) message(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") @@ -43,7 +37,6 @@ ELSE (DEFINED CACHED_OPENSSL) endif (OpenSSL_FIND_REQUIRED) endif (OPENSSL_FOUND) - set(CACHED_OPENSSL ${CACHED_OPENSSL} CACHE INTERNAL "If openssl was checked") MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) -ENDIF (DEFINED CACHED_OPENSSL) +endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) -- cgit v1.2.1 From de179a0b561c77a2fe8cdfab39b724b7c0ce63f4 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 15 Jul 2006 09:22:46 +0000 Subject: fix for OpenSSL 0.9.8b with msvc hope it will work with < 0.9.8b too svn path=/trunk/KDE/kdelibs/; revision=562569 --- modules/FindOpenSSL.cmake | 110 ++++++++++++++++++++++++++++------------------ 1 file changed, 68 insertions(+), 42 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index ed2f4045..5973543a 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -1,42 +1,68 @@ -# - Try to find the OpenSSL encryption library -# Once done this will define -# -# OPENSSL_FOUND - system has the OpenSSL library -# OPENSSL_INCLUDE_DIR - the OpenSSL include directory -# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL - -if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - - # in cache already - SET(OPENSSL_FOUND TRUE) - -else (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - - FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h - /usr/include/ - /usr/local/include/ - ) - - FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 - PATHS - /usr/lib - /usr/local/lib - ) - - if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - set(OPENSSL_FOUND TRUE) - endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - - if (OPENSSL_FOUND) - if (NOT OpenSSL_FIND_QUIETLY) - message(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") - endif (NOT OpenSSL_FIND_QUIETLY) - else (OPENSSL_FOUND) - if (OpenSSL_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find OpenSSL") - endif (OpenSSL_FIND_REQUIRED) - endif (OPENSSL_FOUND) - - MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) - -endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +# - Try to find the OpenSSL encryption library +# Once done this will define +# +# OPENSSL_FOUND - system has the OpenSSL library +# OPENSSL_INCLUDE_DIR - the OpenSSL include directory +# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL + +if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + + # in cache already + SET(OPENSSL_FOUND TRUE) + +else (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + + FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h + /usr/include/ + /usr/local/include/ + ) + + if(WIN32 AND MSVC) + # /MD and /MDd are the standard values - if somone wants to use + # others, the libnames have to change here too + + FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ) + FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssl ssleay32) + + IF(MSVC_IDE) + IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG}) + ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl") + ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + ELSE(MSVC_IDE) + STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) + IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG}) + ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE}) + ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + ENDIF(MSVC_IDE) + MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE) + else(WIN32 AND MSVC) + + FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD + PATHS + /usr/lib + /usr/local/lib + ) + + endif(WIN32 AND MSVC) + + if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + set(OPENSSL_FOUND TRUE) + endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + + if (OPENSSL_FOUND) + if (NOT OpenSSL_FIND_QUIETLY) + message(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") + endif (NOT OpenSSL_FIND_QUIETLY) + else (OPENSSL_FOUND) + if (OpenSSL_FIND_REQUIRED) + message(FATAL_ERROR "Could NOT find OpenSSL") + endif (OpenSSL_FIND_REQUIRED) + endif (OPENSSL_FOUND) + + MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) + +endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) -- cgit v1.2.1 From 2f48fe6095a4dfd09c1130a4d3b5d4ffb4666e08 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 16 Jul 2006 08:02:36 +0000 Subject: don't check for openssl lib on every cmake run (win32) CCMAIL: neundorf@kde.org svn path=/trunk/KDE/kdelibs/; revision=562905 --- modules/FindOpenSSL.cmake | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 5973543a..5188c6f3 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -4,13 +4,20 @@ # OPENSSL_FOUND - system has the OpenSSL library # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL +if(OPENSSL_LIBRARIES) + SET(LIB_FOUND 1) +endif(OPENSSL_LIBRARIES) -if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +if(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + SET(LIB_FOUND 1) +endif(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + +if (OPENSSL_INCLUDE_DIR AND LIB_FOUND) # in cache already SET(OPENSSL_FOUND TRUE) -else (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +else (OPENSSL_INCLUDE_DIR AND LIB_FOUND) FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h /usr/include/ @@ -20,8 +27,9 @@ else (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) if(WIN32 AND MSVC) # /MD and /MDd are the standard values - if somone wants to use # others, the libnames have to change here too + # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b - FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ) + FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssl ssleay32) FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssl ssleay32) IF(MSVC_IDE) @@ -65,4 +73,4 @@ else (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) -endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +endif (OPENSSL_INCLUDE_DIR AND LIB_FOUND) -- cgit v1.2.1 From c778596920e0d5357f216c885e35b4f97d371a23 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Sat, 9 Sep 2006 10:18:35 +0000 Subject: added copyright notice everywhere. Now they all are BSD-licensed, as copyright holder I inserted everywhere the one who added it to svn (or Kitware if it is an enhanced copy from taken cmake) Some developers committed quite often but were not the ones who added the file, if you feel you have also copyright on the file add your name in the specific file. Copyright holders: CCMAIL: montel@kde.org CCMAIL: toscano.pino@tiscali.it CCMAIL: adymo@kdevelop.org CCMAIL: ranger@befunk.com CCMAIL: zack@kde.org CCMAIL: caslav.ilic@gmx.net CCMAIL: syntheticpp@yahoo.com CCMAIL: js@iidea.pl CCMAIL: michael.larouche@kdemail.net CCMAIL: ossi@kde.org CCMAIL: faure@kde.org Committers, but no files added so that they are not listed as copyright holders: CCMAIL: ch.ehrlicher@gmx.de CCMAIL: winter@kde.org CCMAIL: ralf.habacker@freenet.de CCMAIL: moura@kdewebdev.org CCMAIL: kde-buildsystem@kde.org Alex svn path=/trunk/KDE/kdelibs/; revision=582410 --- modules/FindOpenSSL.cmake | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 5188c6f3..f4bd85bd 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -4,6 +4,13 @@ # OPENSSL_FOUND - system has the OpenSSL library # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL +# +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + if(OPENSSL_LIBRARIES) SET(LIB_FOUND 1) endif(OPENSSL_LIBRARIES) -- cgit v1.2.1 From 1511cad3ffbbb7548a6fa9662aac13620facd5cc Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Tue, 19 Sep 2006 20:00:35 +0000 Subject: prepare for merging to cmake Alex svn path=/trunk/KDE/kdelibs/; revision=586500 --- modules/FindOpenSSL.cmake | 123 +++++++++++++++++++++------------------------- 1 file changed, 55 insertions(+), 68 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index f4bd85bd..0172df83 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -4,80 +4,67 @@ # OPENSSL_FOUND - system has the OpenSSL library # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL -# + # Copyright (c) 2006, Alexander Neundorf, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if(OPENSSL_LIBRARIES) - SET(LIB_FOUND 1) -endif(OPENSSL_LIBRARIES) +IF(OPENSSL_LIBRARIES) + SET(OpenSSL_FIND_QUIETLY TRUE) +ENDIF(OPENSSL_LIBRARIES) -if(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) +IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) SET(LIB_FOUND 1) -endif(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) - -if (OPENSSL_INCLUDE_DIR AND LIB_FOUND) - - # in cache already - SET(OPENSSL_FOUND TRUE) - -else (OPENSSL_INCLUDE_DIR AND LIB_FOUND) - - FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h - /usr/include/ - /usr/local/include/ - ) - - if(WIN32 AND MSVC) - # /MD and /MDd are the standard values - if somone wants to use - # others, the libnames have to change here too - # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b - - FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssl ssleay32) - FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssl ssleay32) - - IF(MSVC_IDE) - IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) - SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG}) - ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) - MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl") - ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) - ELSE(MSVC_IDE) - STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) - IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG}) - ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE}) - ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - ENDIF(MSVC_IDE) - MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE) - else(WIN32 AND MSVC) - - FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD - PATHS - /usr/lib - /usr/local/lib - ) - - endif(WIN32 AND MSVC) - - if (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - set(OPENSSL_FOUND TRUE) - endif (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - - if (OPENSSL_FOUND) - if (NOT OpenSSL_FIND_QUIETLY) - message(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") - endif (NOT OpenSSL_FIND_QUIETLY) - else (OPENSSL_FOUND) - if (OpenSSL_FIND_REQUIRED) - message(FATAL_ERROR "Could NOT find OpenSSL") - endif (OpenSSL_FIND_REQUIRED) - endif (OPENSSL_FOUND) - - MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) +ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + +FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h ) + +IF(WIN32 AND MSVC) + # /MD and /MDd are the standard values - if somone wants to use + # others, the libnames have to change here too + # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b + + FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssl ssleay32) + FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssl ssleay32) + + IF(MSVC_IDE) + IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG}) + ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl") + ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + ELSE(MSVC_IDE) + STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) + IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG}) + ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE}) + ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + ENDIF(MSVC_IDE) + MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE) +ELSE(WIN32 AND MSVC) + + FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD ) + +ENDIF(WIN32 AND MSVC) + +IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + SET(OPENSSL_FOUND TRUE) +ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + SET(OPENSSL_FOUND FALSE) +ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + +IF (OPENSSL_FOUND) + IF (NOT OpenSSL_FIND_QUIETLY) + MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") + ENDIF (NOT OpenSSL_FIND_QUIETLY) +ELSE (OPENSSL_FOUND) + IF (OpenSSL_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find OpenSSL") + ENDIF (OpenSSL_FIND_REQUIRED) +ENDIF (OPENSSL_FOUND) + +MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) -endif (OPENSSL_INCLUDE_DIR AND LIB_FOUND) -- cgit v1.2.1 From c61ff987f324e2a5c13768dc29713405d3c5f620 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Thu, 15 Feb 2007 17:48:51 +0000 Subject: add OPENSSL_EAY_LIBRARIES because this lib is sometimes needed on win32 svn path=/trunk/KDE/kdelibs/; revision=633896 --- modules/FindOpenSSL.cmake | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 0172df83..a1f71cdc 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -4,12 +4,37 @@ # OPENSSL_FOUND - system has the OpenSSL library # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL - +# OPENSSL_EAY_LIBRARIES - The additional libraries needed to use OpenSSL on windows # Copyright (c) 2006, Alexander Neundorf, # # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# on win32 we additional need to link to libeay32.lib +MACRO(OPENSSL_ADD_LIB_EAY_LIBS) + # /MD and /MDd are the standard values - if somone wants to use + # others, the libnames have to change here too + # use also eay and libeay32 in debug as fallback for openssl < 0.9.8b + + FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd eay libeay libeay32) + FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD eay libeay libeay32) + + IF(MSVC_IDE) + IF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) + SET(OPENSSL_EAY_LIBRARIES optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG}) + ELSE(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) + MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl (libeay)") + ENDIF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) + ELSE(MSVC_IDE) + STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) + IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_DEBUG}) + ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_RELEASE}) + ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + ENDIF(MSVC_IDE) + MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE) +ENDMACRO(OPENSSL_ADD_LIB_EAY_LIBS) IF(OPENSSL_LIBRARIES) SET(OpenSSL_FIND_QUIETLY TRUE) @@ -50,11 +75,20 @@ ELSE(WIN32 AND MSVC) ENDIF(WIN32 AND MSVC) -IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - SET(OPENSSL_FOUND TRUE) -ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - SET(OPENSSL_FOUND FALSE) -ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +IF(WIN32) + OPENSSL_ADD_LIB_EAY_LIBS() + IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) + SET(OPENSSL_FOUND TRUE) + ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) + SET(OPENSSL_FOUND FALSE) + ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) +ELSE(WIN32) + IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + SET(OPENSSL_FOUND TRUE) + ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + SET(OPENSSL_FOUND FALSE) + ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +ENDIF(WIN32) IF (OPENSSL_FOUND) IF (NOT OpenSSL_FIND_QUIETLY) -- cgit v1.2.1 From 71d71840f0342ee36fe0904959fb8947c85353fd Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 25 Feb 2007 10:11:17 +0000 Subject: find libeay32 on win32 with mingw too svn path=/trunk/KDE/kdelibs/; revision=637067 --- modules/FindOpenSSL.cmake | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index a1f71cdc..4c2a3f7d 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -12,28 +12,32 @@ # on win32 we additional need to link to libeay32.lib MACRO(OPENSSL_ADD_LIB_EAY_LIBS) - # /MD and /MDd are the standard values - if somone wants to use - # others, the libnames have to change here too - # use also eay and libeay32 in debug as fallback for openssl < 0.9.8b + IF(MSVC) + # /MD and /MDd are the standard values - if somone wants to use + # others, the libnames have to change here too + # use also eay and libeay32 in debug as fallback for openssl < 0.9.8b - FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd eay libeay libeay32) - FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD eay libeay libeay32) + FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd eay libeay libeay32) + FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD eay libeay libeay32) - IF(MSVC_IDE) - IF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) - SET(OPENSSL_EAY_LIBRARIES optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG}) - ELSE(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) - MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl (libeay)") - ENDIF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) - ELSE(MSVC_IDE) - STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) - IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_DEBUG}) - ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_RELEASE}) - ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - ENDIF(MSVC_IDE) - MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE) + IF(MSVC_IDE) + IF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) + SET(OPENSSL_EAY_LIBRARIES optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG}) + ELSE(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) + MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl (libeay)") + ENDIF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) + ELSE(MSVC_IDE) + STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) + IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_DEBUG}) + ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_RELEASE}) + ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) + ENDIF(MSVC_IDE) + MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE) + ELSE(MSVC) + FIND_LIBRARY(OPENSSL_EAY_LIBRARIES NAMES eay libeay libeay32 ) + ENDIF(MSVC) ENDMACRO(OPENSSL_ADD_LIB_EAY_LIBS) IF(OPENSSL_LIBRARIES) -- cgit v1.2.1 From 0e93aecc9d6e8736fa9b2bf0b9a8c6adc30e6337 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Mon, 24 Sep 2007 10:53:59 +0000 Subject: switch to new macro FIND_LIBRARY_EX() to avoid code duplication svn path=/trunk/KDE/kdelibs/; revision=716254 --- modules/FindOpenSSL.cmake | 170 +++++++++++++++++----------------------------- 1 file changed, 62 insertions(+), 108 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 4c2a3f7d..44cfa50f 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -1,108 +1,62 @@ -# - Try to find the OpenSSL encryption library -# Once done this will define -# -# OPENSSL_FOUND - system has the OpenSSL library -# OPENSSL_INCLUDE_DIR - the OpenSSL include directory -# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL -# OPENSSL_EAY_LIBRARIES - The additional libraries needed to use OpenSSL on windows -# Copyright (c) 2006, Alexander Neundorf, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -# on win32 we additional need to link to libeay32.lib -MACRO(OPENSSL_ADD_LIB_EAY_LIBS) - IF(MSVC) - # /MD and /MDd are the standard values - if somone wants to use - # others, the libnames have to change here too - # use also eay and libeay32 in debug as fallback for openssl < 0.9.8b - - FIND_LIBRARY(LIB_EAY_DEBUG NAMES libeay32MDd eay libeay libeay32) - FIND_LIBRARY(LIB_EAY_RELEASE NAMES libeay32MD eay libeay libeay32) - - IF(MSVC_IDE) - IF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) - SET(OPENSSL_EAY_LIBRARIES optimized ${LIB_EAY_RELEASE} debug ${LIB_EAY_DEBUG}) - ELSE(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) - MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl (libeay)") - ENDIF(LIB_EAY_DEBUG AND LIB_EAY_RELEASE) - ELSE(MSVC_IDE) - STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) - IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_DEBUG}) - ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - SET(OPENSSL_EAY_LIBRARIES ${LIB_EAY_RELEASE}) - ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - ENDIF(MSVC_IDE) - MARK_AS_ADVANCED(LIB_EAY_DEBUG LIB_EAY_RELEASE) - ELSE(MSVC) - FIND_LIBRARY(OPENSSL_EAY_LIBRARIES NAMES eay libeay libeay32 ) - ENDIF(MSVC) -ENDMACRO(OPENSSL_ADD_LIB_EAY_LIBS) - -IF(OPENSSL_LIBRARIES) - SET(OpenSSL_FIND_QUIETLY TRUE) -ENDIF(OPENSSL_LIBRARIES) - -IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) - SET(LIB_FOUND 1) -ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) - -FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h ) - -IF(WIN32 AND MSVC) - # /MD and /MDd are the standard values - if somone wants to use - # others, the libnames have to change here too - # use also ssl and ssleay32 in debug as fallback for openssl < 0.9.8b - - FIND_LIBRARY(SSL_EAY_DEBUG NAMES ssleay32MDd ssl ssleay32) - FIND_LIBRARY(SSL_EAY_RELEASE NAMES ssleay32MD ssl ssleay32) - - IF(MSVC_IDE) - IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) - SET(OPENSSL_LIBRARIES optimized ${SSL_EAY_RELEASE} debug ${SSL_EAY_DEBUG}) - ELSE(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) - MESSAGE(FATAL_ERROR "Could not find the debug and release version of openssl") - ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) - ELSE(MSVC_IDE) - STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) - IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - SET(OPENSSL_LIBRARIES ${SSL_EAY_DEBUG}) - ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - SET(OPENSSL_LIBRARIES ${SSL_EAY_RELEASE}) - ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug) - ENDIF(MSVC_IDE) - MARK_AS_ADVANCED(SSL_EAY_DEBUG SSL_EAY_RELEASE) -ELSE(WIN32 AND MSVC) - - FIND_LIBRARY(OPENSSL_LIBRARIES NAMES ssl ssleay32 ssleay32MD ) - -ENDIF(WIN32 AND MSVC) - -IF(WIN32) - OPENSSL_ADD_LIB_EAY_LIBS() - IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) - SET(OPENSSL_FOUND TRUE) - ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) - SET(OPENSSL_FOUND FALSE) - ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) -ELSE(WIN32) - IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - SET(OPENSSL_FOUND TRUE) - ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) - SET(OPENSSL_FOUND FALSE) - ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) -ENDIF(WIN32) - -IF (OPENSSL_FOUND) - IF (NOT OpenSSL_FIND_QUIETLY) - MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") - ENDIF (NOT OpenSSL_FIND_QUIETLY) -ELSE (OPENSSL_FOUND) - IF (OpenSSL_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could NOT find OpenSSL") - ENDIF (OpenSSL_FIND_REQUIRED) -ENDIF (OPENSSL_FOUND) - -MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) - +# - Try to find the OpenSSL encryption library +# Once done this will define +# +# OPENSSL_FOUND - system has the OpenSSL library +# OPENSSL_INCLUDE_DIR - the OpenSSL include directory +# OPENSSL_LIBRARIES - The libraries needed to use OpenSSL +# OPENSSL_EAY_LIBRARIES - The additional libraries needed to use OpenSSL on windows +# Copyright (c) 2006, Alexander Neundorf, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +include(FindLibraryEx) + +# on win32 we additional need to link to libeay32.lib +MACRO(OPENSSL_ADD_LIB_EAY_LIBS) + FIND_LIBRARY_EX(OPENSSL_EAY_LIBRARIES + WIN32_DEBUG_POSTFIX d + NAMES eay libeay libeay32 libeay32MD) +ENDMACRO(OPENSSL_ADD_LIB_EAY_LIBS) + +IF(OPENSSL_LIBRARIES) + SET(OpenSSL_FIND_QUIETLY TRUE) +ENDIF(OPENSSL_LIBRARIES) + +IF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + SET(LIB_FOUND 1) +ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) + +FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h ) + +FIND_LIBRARY_EX(OPENSSL_LIBRARIES + WIN32_DEBUG_POSTFIX d + NAMES ssl ssleay ssleay32 ssleay32MD) + +IF(WIN32) + OPENSSL_ADD_LIB_EAY_LIBS() + IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) + SET(OPENSSL_FOUND TRUE) + ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) + SET(OPENSSL_FOUND FALSE) + ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES AND OPENSSL_EAY_LIBRARIES) +ELSE(WIN32) + IF(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + SET(OPENSSL_FOUND TRUE) + ELSE(OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) + SET(OPENSSL_FOUND FALSE) + ENDIF (OPENSSL_INCLUDE_DIR AND OPENSSL_LIBRARIES) +ENDIF(WIN32) + +IF (OPENSSL_FOUND) + IF (NOT OpenSSL_FIND_QUIETLY) + MESSAGE(STATUS "Found OpenSSL: ${OPENSSL_LIBRARIES}") + ENDIF (NOT OpenSSL_FIND_QUIETLY) +ELSE (OPENSSL_FOUND) + IF (OpenSSL_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find OpenSSL") + ENDIF (OpenSSL_FIND_REQUIRED) +ENDIF (OPENSSL_FOUND) + +MARK_AS_ADVANCED(OPENSSL_INCLUDE_DIR OPENSSL_LIBRARIES) + -- cgit v1.2.1 From b94768531ef8881f2b6e7b93c4f0324f02b80487 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sun, 30 Sep 2007 16:19:18 +0000 Subject: FIND_LIBRARY_EX -> FIND_LIBRARY_WITH_DEBUG svn path=/trunk/KDE/kdelibs/; revision=719224 --- modules/FindOpenSSL.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 44cfa50f..2b5313d9 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -10,11 +10,11 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -include(FindLibraryEx) +INCLUDE(FindLibraryWithDebug) # on win32 we additional need to link to libeay32.lib MACRO(OPENSSL_ADD_LIB_EAY_LIBS) - FIND_LIBRARY_EX(OPENSSL_EAY_LIBRARIES + FIND_LIBRARY_WITH_DEBUG(OPENSSL_EAY_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES eay libeay libeay32 libeay32MD) ENDMACRO(OPENSSL_ADD_LIB_EAY_LIBS) @@ -29,7 +29,7 @@ ENDIF(SSL_EAY_DEBUG AND SSL_EAY_RELEASE) FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h ) -FIND_LIBRARY_EX(OPENSSL_LIBRARIES +FIND_LIBRARY_WITH_DEBUG(OPENSSL_LIBRARIES WIN32_DEBUG_POSTFIX d NAMES ssl ssleay ssleay32 ssleay32MD) -- cgit v1.2.1 From 814455b7ad321c88e730662fda58261087b72e72 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 18 Feb 2008 19:06:32 +0000 Subject: some improvements to the docs: -some modules were not at all documented, only few are left now -the copyright message doesn't have to be printed for every module in the docs -fix FindKorundom.cmake, it didn't follow the style guide and had typos (e.g. Korumdum_FOUND instead of KORUNDUM_FOUND) Alex (will commit modified FindKDE4Internal.cmake after Christians commit) svn path=/trunk/KDE/kdelibs/; revision=776742 --- modules/FindOpenSSL.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 2b5313d9..1b915530 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -5,6 +5,7 @@ # OPENSSL_INCLUDE_DIR - the OpenSSL include directory # OPENSSL_LIBRARIES - The libraries needed to use OpenSSL # OPENSSL_EAY_LIBRARIES - The additional libraries needed to use OpenSSL on windows + # Copyright (c) 2006, Alexander Neundorf, # # Redistribution and use is allowed according to the terms of the BSD license. -- cgit v1.2.1 From 2638304d661b11a9590da90b8466f6066eb31c43 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Mon, 9 Feb 2009 18:13:39 +0000 Subject: find our new slef-compiled openssl 0.9.8j svn path=/trunk/KDE/kdelibs/; revision=923916 --- modules/FindOpenSSL.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindOpenSSL.cmake') diff --git a/modules/FindOpenSSL.cmake b/modules/FindOpenSSL.cmake index 1b915530..4ce8321b 100644 --- a/modules/FindOpenSSL.cmake +++ b/modules/FindOpenSSL.cmake @@ -32,7 +32,7 @@ FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h ) FIND_LIBRARY_WITH_DEBUG(OPENSSL_LIBRARIES WIN32_DEBUG_POSTFIX d - NAMES ssl ssleay ssleay32 ssleay32MD) + NAMES ssl ssleay ssleay32 libssleay32 ssleay32MD) IF(WIN32) OPENSSL_ADD_LIB_EAY_LIBS() -- cgit v1.2.1