cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CMake scripts

From: Sukender <suky0001_at_free.fr>
Date: Thu, 02 Apr 2009 00:18:50 +0200

Le Wed, 01 Apr 2009 23:56:11 +0200, Piotr Dobrogost <pd_at_curlpp.org> a écrit:

> Sukender wrote:
>> Hi all,
>>
>> I'm starting working on merging tetest's CMake scripts and mine.
>> So I'm requesting somewhere to put versioned files; we told about curl CVS, and I think it could be a good idea (even in a branch, that sounds fine to me).
>>
>> About tetest's CMake scripts themselves, I got questions:
>> - Do they allow the user to select which SSL lib to use?
>
> From what I see it doesn't allow.
>
> Do they allow to choose to NOT build using SSL? I'm not 100% sure.
>
> From what I see it allows.
>
> Starting from line 84:
>
> OPTION(CMAKE_USE_OPENSSL "Use OpenSSL code. Experimental" ON)
> MARK_AS_ADVANCED(CMAKE_USE_OPENSSL)
> IF(CMAKE_USE_OPENSSL)
> CHECK_LIBRARY_EXISTS_CONCAT("crypto" CRYPTO_lock HAVE_LIBCRYPTO)
> CHECK_LIBRARY_EXISTS_CONCAT("ssl" SSL_connect HAVE_LIBSSL)
> ENDIF(CMAKE_USE_OPENSSL)
>
>
> Starting from line 326:
>
> IF(CMAKE_USE_OPENSSL)
> CHECK_SYMBOL_EXISTS(RAND_status "${CURL_INCLUDES}" HAVE_RAND_STATUS)
> CHECK_SYMBOL_EXISTS(RAND_screen "${CURL_INCLUDES}" HAVE_RAND_SCREEN)
> CHECK_SYMBOL_EXISTS(RAND_egd "${CURL_INCLUDES}" HAVE_RAND_EGD)
> CHECK_SYMBOL_EXISTS(CRYPTO_cleanup_all_ex_data "${CURL_INCLUDES}"
> HAVE_CRYPTO_CLEANUP_ALL_EX_DATA)
> IF(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
> SET(USE_OPENSSL 1)
> SET(USE_SSLEAY 1)
> ENDIF(HAVE_LIBCRYPTO AND HAVE_LIBSSL)
> ENDIF(CMAKE_USE_OPENSSL)

Thanks, you saved me precious minutes!
I'll try to make it accept all 5 (or 4, as Daniel explained one is for an old OS) SSL libs later.

-- 
Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
Received on 2009-04-02