summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-12-11 16:48:17 +0800
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2019-12-20 12:54:50 +0100
commit694deef3d4b1c56418ce6f4a2378c8927a3a3072 (patch)
tree1e8823779bbde0ba2e43b43932f72316932b8d98
parentf0327f7731976b0efe1e295adabdb1a52bb4bef3 (diff)
downloadsigc++-694deef3d4b1c56418ce6f4a2378c8927a3a3072.tar.gz
Meson: Fix Visual Studio builds
We need to make sure that SIGC_BUILD and _WINDLL are defined when building the libsigc++ DLL, so that it gets build properly.
-rw-r--r--sigc++/meson.build8
1 files changed, 8 insertions, 0 deletions
diff --git a/sigc++/meson.build b/sigc++/meson.build
index 8e92186..3ab7c69 100644
--- a/sigc++/meson.build
+++ b/sigc++/meson.build
@@ -68,11 +68,19 @@ install_headers(adaptors_h_files, subdir: sigcxx_pcname / 'sigc++' / 'adaptors')
install_headers(functors_h_files, subdir: sigcxx_pcname / 'sigc++' / 'functors')
install_headers(tuple_utils_h_files, subdir: sigcxx_pcname / 'sigc++' / 'tuple-utils')
+extra_sigc_cppflags = []
+
+# Make sure we are exporting the symbols from the DLL
+if is_msvc
+ extra_sigc_cppflags += ['-DSIGC_BUILD', '-D_WINDLL']
+endif
+
extra_include_dirs = ['..']
sigcxx_library = library(sigcxx_pcname,
source_cc_files,
version: sigcxx_libversion,
include_directories: extra_include_dirs,
+ cpp_args: extra_sigc_cppflags,
dependencies: sigcxx_build_dep,
install: true,
)