Skip to content

Commit 8799330

Browse files
committed
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.
1 parent 0a221bd commit 8799330

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sigc++/meson.build

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,19 @@ install_headers(adaptors_h_files, subdir: sigcxx_pcname / 'sigc++' / 'adaptors')
6868
install_headers(functors_h_files, subdir: sigcxx_pcname / 'sigc++' / 'functors')
6969
install_headers(tuple_utils_h_files, subdir: sigcxx_pcname / 'sigc++' / 'tuple-utils')
7070

71+
extra_sigc_cppflags = []
72+
73+
# Make sure we are exporting the symbols from the DLL
74+
if is_msvc
75+
extra_sigc_cppflags += ['-DSIGC_BUILD', '-D_WINDLL']
76+
endif
77+
7178
extra_include_dirs = ['..']
7279
sigcxx_library = library(sigcxx_pcname,
7380
source_cc_files,
7481
version: sigcxx_libversion,
7582
include_directories: extra_include_dirs,
83+
cpp_args: extra_sigc_cppflags,
7684
dependencies: sigcxx_build_dep,
7785
install: true,
7886
)

0 commit comments

Comments
 (0)