cmake // build issue when OpenSSL enabled on Windows and schannel detected #617

Closed
wants to merge 1 commit into
from

Projects

None yet

4 participants

@snikulov
Member

Options OpenSSL and Windows Schannel should be exclusive.
Enabling them both will break the build - we got redefinition in ssl_connect_data structure (ref to Appveyour buils).

So on Windows I disable CMAKE_USE_OPENSSL by default (Windows Schannel is preferred).
But we always can override this option with
cmake .. -DCMAKE_USE_OPENNSSL=ON | OFF

@mention-bot

By analyzing the blame information on this pull request, we identified @jzakrzewski, @billhoffman and @Sukender to be potential reviewers

@snikulov snikulov changed the title from Fixed build issue when OpenSSL enabled on Windows and schannel detected to cmake // build issue when OpenSSL enabled on Windows and schannel detected Jan 27, 2016
@snikulov
Member

@bradking Could you please review?

@bradking bradking commented on an outdated diff Jan 27, 2016
CMakeLists.txt
mark_as_advanced(CMAKE_USE_OPENSSL)
+if(WIN32)
+ CMAKE_DEPENDENT_OPTION(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" OFF
+ "CMAKE_USE_OPENSSL" ON)
@bradking
bradking Jan 27, 2016 Contributor

IIUC the goal is to present the CURL_WINDOWS_SSPI option (with default ON) when CMAKE_USE_OPENSSL is OFF (default). When CMAKE_USE_OPENSSL is ON then CURL_WINDOWS_SSPI should be non-optional and forced to OFF. In that case the dependent option should be:

  CMAKE_DEPENDENT_OPTION(CURL_WINDOWS_SSPI "Use windows libraries to allow NTLM authentication without openssl" ON
    "NOT CMAKE_USE_OPENSSL" OFF)
@snikulov
Member

@bradking updated per your comments with snikulov@b2e6d0a

If it looks OK for you - I'll squash it into single commit.

@bradking
Contributor

Yes, LGTM.

@snikulov snikulov Fixed build issue when OpenSSL enabled on Windows and schannel detected
9a7486e
@snikulov
Member

@bagder I'm done.
CMake build for windows goes green again.

@bagder bagder closed this in a8135f0 Jan 28, 2016
@bagder
Member
bagder commented Jan 28, 2016

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment