diff options
author | Brian Samek <brian.samek@mongodb.com> | 2016-11-16 13:55:44 -0500 |
---|---|---|
committer | Brian Samek <brian.samek@mongodb.com> | 2016-11-22 16:10:42 -0500 |
commit | 99f1f23edbfc07ce00397a4300d28c74b9046b7b (patch) | |
tree | 69a667d7f3ea6e71ca30ac5f4027895f5399d234 /SConstruct | |
parent | 4757d1767d93c564500ee4355ba8aa2da6362c5e (diff) | |
download | mongo-99f1f23edbfc07ce00397a4300d28c74b9046b7b.tar.gz |
SERVER-17368 Add openssl files to windows zip file
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index f079a65116f..02e589c9032 100644 --- a/SConstruct +++ b/SConstruct @@ -760,6 +760,10 @@ env_vars.Add('VERBOSE', default='auto', ) +env_vars.Add('WINDOWS_OPENSSL_BIN', + help='Sets the path to the openssl binaries for packaging', + default='c:/openssl/bin') + # -- Validate user provided options -- # A dummy environment that should *only* have the variables we have set. In practice it has @@ -2620,6 +2624,18 @@ def doConfigure(myenv): }) libdeps.setup_conftests(conf) + def addOpenSslLibraryToDistArchive(file_name): + openssl_bin_path = os.path.normpath(env['WINDOWS_OPENSSL_BIN'].lower()) + full_file_name = os.path.join(openssl_bin_path, file_name) + if os.path.exists(full_file_name): + env.Append(ARCHIVE_ADDITIONS=[full_file_name]) + env.Append(ARCHIVE_ADDITION_DIR_MAP={ + openssl_bin_path: "bin" + }) + return True + else: + return False + if has_option( "ssl" ): sslLibName = "ssl" cryptoLibName = "crypto" @@ -2627,6 +2643,12 @@ def doConfigure(myenv): sslLibName = "ssleay32" cryptoLibName = "libeay32" + # Add the SSL binaries to the zip file distribution + files = ['ssleay32.dll', 'libeay32.dll'] + for extra_file in files: + if not addOpenSslLibraryToDistArchive(extra_file): + print("WARNING: Cannot find SSL library '%s'" % extra_file) + # Used to import system certificate keychains if conf.env.TargetOSIs('osx'): conf.env.AppendUnique(FRAMEWORKS=[ |