diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-06-26 15:03:08 +0000 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2020-06-26 15:03:08 +0000 |
commit | d9c7929383eec6d881998304dd8ad47d094141a0 (patch) | |
tree | a1eab3604452b8fff231cbeef67792c5205f4cec /meson.build | |
parent | 93d941b0bde0fb5db84ddc5b051566f1925d99ec (diff) | |
parent | f12c921b3096f770938dfea61203b22e5085418d (diff) |
Merge branch 'meson-msvc-toolset' into 'master'
Meson/Visual Studio builds: Include toolset version by default (master branch)
See merge request cairo/cairomm!8
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/meson.build b/meson.build index f6eacd8..b4bfc0c 100644 --- a/meson.build +++ b/meson.build @@ -79,6 +79,8 @@ build_documentation = build_documentation_opt == 'true' or \ build_examples = get_option('build-examples') build_tests_opt = get_option('build-tests') +use_msvc14x_toolset_ver = get_option('msvc14x-parallel-installable') + # Installation directories are relative to {prefix}. install_prefix = get_option('prefix') install_includedir = get_option('includedir') @@ -207,6 +209,9 @@ endif warning_flags = cpp_compiler.get_supported_arguments(warning_flags) add_project_arguments(warning_flags, language: 'cpp') +# Add toolset version in builds done with Visual Studio 2017 or later +msvc14x_toolset_ver = '' + # MSVC: Ignore warnings that aren't really harmful, but make those # that should not be overlooked stand out. if is_msvc @@ -214,8 +219,17 @@ if is_msvc disabled_warning = cpp_compiler.get_supported_arguments(wd) add_project_arguments(disabled_warning, language: 'cpp') endforeach + if use_msvc14x_toolset_ver + if cpp_compiler.version().version_compare('>=19.20') + msvc14x_toolset_ver = '-vc142' + elif cpp_compiler.version().version_compare('>=19.10') + msvc14x_toolset_ver = '-vc141' + endif + endif endif +cairomm_libname = meson.project_name() + msvc14x_toolset_ver + '-' + cairomm_api_version + # Create cairommconfig.h. mm_conf_data = configuration_data() if not build_deprecated_api |