From c76e9cc5e12b5837d4286db7061dfe6c350e0bf2 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sat, 1 Dec 2018 18:44:13 +0000 Subject: [PATCH] Change Jamfile default openssl path on Windows The widely used Windows OpenSSL package[1] uses C:\OpenSSL-Win[32|64] as the install location so set this as default in Jamfile for Windows. It also means that the appveyor builds can be simplified by using their installed OpenSSL. Mingw is set to the same location so remove seperate specification. [1]: https://slproweb.com/products/Win32OpenSSL.html --- Jamfile | 27 ++++++--------------------- appveyor.yml | 16 ---------------- docs/building.rst | 5 +++-- 3 files changed, 9 insertions(+), 39 deletions(-) diff --git a/Jamfile b/Jamfile index 871107cb0..4250c6a16 100644 --- a/Jamfile +++ b/Jamfile @@ -359,20 +359,13 @@ rule openssl-lib-path ( properties * ) # brew install openssl OPENSSL_LIB = /usr/local/opt/openssl/lib ; } - else if windows in $(properties) - && gcc in $(properties) - && $(OPENSSL_LIB) = "" - { - # on mingw, assume openssl is installed in c:\OpenSSL-Win32 by default - OPENSSL_LIB = c:\\OpenSSL-Win32\\lib ; - } else if windows in $(properties) && $(OPENSSL_LIB) = "" { - # on windows, just assume openssl is installed to c:\openssl + # on windows, assume openssl is installed to c:\OpenSSL-Win32 if 64 in $(properties) - { OPENSSL_LIB = c:\\openssl\\lib64 ; } + { OPENSSL_LIB = c:\\OpenSSL-Win64\\lib ; } else - { OPENSSL_LIB = c:\\openssl\\lib ; } + { OPENSSL_LIB = c:\\OpenSSL-Win32\\lib ; } } local result ; @@ -392,21 +385,13 @@ rule openssl-include-path ( properties * ) # brew install openssl OPENSSL_INCLUDE = /usr/local/opt/openssl/include ; } - else if windows in $(properties) - && gcc in $(properties) - && $(OPENSSL_INCLUDE) = "" - { - # on mingw, assume openssl is installed in c:\OpenSSL-Win32 by default - OPENSSL_INCLUDE = c:\\OpenSSL-Win32\\include ; - } else if windows in $(properties) && $(OPENSSL_INCLUDE) = "" { - # on windows, just assume openssl is installed to c:\openssl - # not sure if there's a better way to find out where it may be + # on windows, assume openssl is installed to c:\OpenSSL-Win32 if 64 in $(properties) - { OPENSSL_INCLUDE = c:\\openssl\\include64 ; } + { OPENSSL_INCLUDE = c:\\OpenSSL-Win64\\include ; } else - { OPENSSL_INCLUDE = c:\\openssl\\include ; } + { OPENSSL_INCLUDE = c:\\OpenSSL-Win32\\include ; } } local result ; diff --git a/appveyor.yml b/appveyor.yml index 72087f37d..13f9b1e60 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -37,19 +37,6 @@ install: - if not defined crypto ( set crypto=built-in ) - if not defined linkflags ( set linkflags="" ) - if not defined include ( set include="" ) - - if %compiler% == msvc-14.0 if defined crypto if not exist openssl-1.0.1p-vs2015.7z ( - echo downloading openssl-2015 - & appveyor DownloadFile "https://www.npcglib.org/~stathis/downloads/openssl-1.0.1p-vs2015.7z" - ) - - if %compiler% == msvc-14.0 if defined crypto ( - echo extracting openssl-2015 - & 7z x -oc:\ -aoa openssl-1.0.1p-vs2015.7z > nul - & rename c:\openssl-1.0.1p-vs2015 openssl - & copy c:\openssl\lib64\ssleay32MT.lib c:\openssl\lib64\ssleay32.lib - & copy c:\openssl\lib64\libeay32MT.lib c:\openssl\lib64\libeay32.lib - & copy c:\openssl\lib\ssleay32MT.lib c:\openssl\lib\ssleay32.lib - & copy c:\openssl\lib\libeay32MT.lib c:\openssl\lib\libeay32.lib - ) - cd %ROOT_DIRECTORY% - set BOOST_ROOT=c:\Libraries\boost_1_63_0 - set BOOST_BUILD_PATH=%BOOST_ROOT%\tools\build @@ -67,9 +54,6 @@ install: - build.bat >nul - cd %ROOT_DIRECTORY% -cache: - - openssl-1.0.1p-vs2015.7z - build_script: # examples - cd %ROOT_DIRECTORY%\examples diff --git a/docs/building.rst b/docs/building.rst index ea1a2ef25..e62ae5720 100644 --- a/docs/building.rst +++ b/docs/building.rst @@ -235,7 +235,8 @@ For more build configuration flags see `Build configurations`_. When enabling linking against openssl (by setting the ``crypto`` feature to ``openssl``) the Jamfile will look in some default directory for the openssl headers and libraries. On macOS, it will look for the homebrew openssl package. -On windows it will look in ``c:\openssl`` and MinGW in ``c:\OpenSSL-Win32``. +On Windows, it will look in ``C:\OpenSSL-Win32``, or ``C:\OpenSSL-Win64`` if +compiling in 64-bit. To customize the library path and include path for openssl, set the features ``openssl-lib`` and ``openssl-include`` respectively. @@ -482,7 +483,7 @@ If you enabled test in the configuration step, to run them, run:: building with other build systems --------------------------------- - + If you're building in MS Visual Studio, you may have to set the compiler options "force conformance in for loop scope", "treat wchar_t as built-in type" and "Enable Run-Time Type Info" to Yes.