diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2019-12-24 16:18:18 +0800 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2019-12-24 10:46:51 +0100 |
commit | 1eed1d0f6ef27f8c052349c64dce6c0ef9714d38 (patch) | |
tree | 1d63e662f8d194757041439d5accd2464a84d226 | |
parent | 2f87f7f246eb96d242bc2a574e55680a670c30b9 (diff) | |
download | sigc++-1eed1d0f6ef27f8c052349c64dce6c0ef9714d38.tar.gz |
meson: Ensure symbols are exported on MSVC builds
Make sure the correct build macros are specified when building
libsigc++, so that:
-The symbols are properly exported
-We do not break builds as a result of unecesary warnings
-rw-r--r-- | sigc++/meson.build | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sigc++/meson.build b/sigc++/meson.build index 0055089..101fb5d 100644 --- a/sigc++/meson.build +++ b/sigc++/meson.build @@ -92,6 +92,13 @@ src_untracked_sigcxx = project_source_root / untracked_sigcxx handle_built_files = project_source_root / 'tools' / 'handle-built-files.py' +extra_sigc_cppflags = [] + +# Make sure we are exporting the symbols from the DLL +if is_msvc + extra_sigc_cppflags += ['-DSIGC_BUILD', '-D_WINDLL'] +endif + if maintainer_mode # Maintainer mode. Generate .h and .cc files from .m4 files in macros/ directories. @@ -152,6 +159,7 @@ if maintainer_mode sigcxx_library = library(sigcxx_pcname, source_cc_files, built_cc_file_targets, built_h_file_targets, version: sigcxx_libversion, + cpp_args: extra_sigc_cppflags, include_directories: extra_include_dirs, dependencies: sigcxx_build_dep, install: true, @@ -193,6 +201,7 @@ else # not maintainer_mode sigcxx_library = library(sigcxx_pcname, source_cc_files, untracked_built_cc_files, version: sigcxx_libversion, + cpp_args: extra_sigc_cppflags, include_directories: extra_include_dirs, dependencies: sigcxx_build_dep, install: true, |