diff options
author | Jack Lloyd <[email protected]> | 2017-12-02 05:46:59 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-02 08:24:59 -0500 |
commit | 70e88d6d5b8179e1bc0d96b20aa0f63e0960a900 (patch) | |
tree | 5db78aea2404f1cd166ac13e3fe227be48fe6b3c /src/scripts | |
parent | 35add1e69f380eeb3010e1d0cda5225fc8c5a0bf (diff) |
Fix install when static lib is disabled
Add a test in CI to cover this
Diffstat (limited to 'src/scripts')
-rwxr-xr-x | src/scripts/ci_build.py | 5 | ||||
-rwxr-xr-x | src/scripts/install.py | 8 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py index 72e9d8e62..74c6a7bfb 100755 --- a/src/scripts/ci_build.py +++ b/src/scripts/ci_build.py @@ -62,6 +62,9 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin, ccache, ro if target_cpu != None: flags += ['--cpu=%s' % (target_cpu)] + if target in ['shared', 'mini-shared']: + flags += ['--disable-static'] + if target in ['static', 'mini-static', 'fuzzers'] or target_os in ['ios', 'mingw']: flags += ['--disable-shared'] @@ -431,7 +434,7 @@ def main(args=None): if use_python3: cmds.append(['python3', botan_py]) - if target == 'shared': + if target in ['shared', 'static', 'bsi', 'nist']: cmds.append(make_cmd + ['install']) if target in ['sonar']: diff --git a/src/scripts/install.py b/src/scripts/install.py index 46dc6e09a..7a5659b47 100755 --- a/src/scripts/install.py +++ b/src/scripts/install.py @@ -165,6 +165,7 @@ def main(args): ver_patch = int(cfg['version_patch']) target_os = cfg['os'] build_shared_lib = bool(cfg['build_shared_lib']) + build_static_lib = bool(cfg['build_static_lib']) bin_dir = os.path.join(options.prefix, options.bindir) lib_dir = os.path.join(options.prefix, options.libdir) @@ -196,9 +197,10 @@ def main(args): copy_file(os.path.join(build_external_include_dir, include), prepend_destdir(os.path.join(target_include_dir, include))) - static_lib = process_template('%{lib_prefix}%{libname}.%{static_suffix}') - copy_file(os.path.join(out_dir, static_lib), - prepend_destdir(os.path.join(lib_dir, os.path.basename(static_lib)))) + if build_static_lib: + static_lib = process_template('%{lib_prefix}%{libname}.%{static_suffix}') + copy_file(os.path.join(out_dir, static_lib), + prepend_destdir(os.path.join(lib_dir, os.path.basename(static_lib)))) if build_shared_lib: if target_os == "windows": |