Hello All! I'm using cmake to build curl/libcurl on Windows/Linux. The problem I've found on Windows - cmake incorrectly produce curl_config.h even if openssl found.
For Linux it is not so visible because openssl includes resides in default location and cmake will find them anyway. But issue can be exposed if explicetly define custom openssl installation (cross compilation for example) through -DOPENSSL_ROOT_DIR=<custom ssl install path> Here example log from cmake generation (on Windows): c:\WORK\GITHUB\build>cmake ../curl -G"Ninja" -DOPENSSL_ROOT_DIR=c:/dev32/openssl -- curl version=[7.28.2] ... -- Found OpenSSL: c:/DEV32/openssl/lib/ssleay32.lib;c:/DEV32/openssl/lib/libeay3 2.lib (found version "1.0.1c") ... -- Looking for 15 include files ws2tcpip.h, ..., openssl/crypto.h -- Looking for 15 include files ws2tcpip.h, ..., openssl/crypto.h - not found -- Looking for 15 include files ws2tcpip.h, ..., openssl/engine.h -- Looking for 15 include files ws2tcpip.h, ..., openssl/engine.h - not found -- Looking for 15 include files ws2tcpip.h, ..., openssl/err.h -- Looking for 15 include files ws2tcpip.h, ..., openssl/err.h - not found -- Looking for 15 include files ws2tcpip.h, ..., openssl/pem.h -- Looking for 15 include files ws2tcpip.h, ..., openssl/pem.h - not found -- Looking for 15 include files ws2tcpip.h, ..., openssl/pkcs12.h -- Looking for 15 include files ws2tcpip.h, ..., openssl/pkcs12.h - not found -- Looking for 15 include files ws2tcpip.h, ..., openssl/rsa.h -- Looking for 15 include files ws2tcpip.h, ..., openssl/rsa.h - not found -- Looking for 15 include files ws2tcpip.h, ..., openssl/ssl.h -- Looking for 15 include files ws2tcpip.h, ..., openssl/ssl.h - not found -- Looking for 15 include files ws2tcpip.h, ..., openssl/x509.h -- Looking for 15 include files ws2tcpip.h, ..., openssl/x509.h - not found .... As result we have curl_config.h without proper defines ... /* Define to 1 if you have the <openssl/crypto.h> header file. */ /* #undef HAVE_OPENSSL_CRYPTO_H */ /* Define to 1 if you have the <openssl/engine.h> header file. */ /* #undef HAVE_OPENSSL_ENGINE_H */ /* Define to 1 if you have the <openssl/err.h> header file. */ /* #undef HAVE_OPENSSL_ERR_H */ ... Attached patch will address this issue (also pull request on github https://github.com/bagder/curl/pull/54). Could you please review and integrate? Thank you. -- Best Regards, Sergei Nikulov
0001-cmake-updated-OpenSSL-build.patch
Description: Binary data
------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
