Skip to content

Commit def4fff

Browse files
committed
meson: enable static building on windows
1 parent 3585d90 commit def4fff

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

libxml++config.h.meson

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
/* Micro version number of libxml++. */
1717
#mesondefine LIBXMLXX_MICRO_VERSION
1818

19+
#mesondefine LIBXMLXX_STATIC
20+
1921
// Enable DLL-specific stuff only when not building a static library
2022
#if !defined(__CYGWIN__) && (defined(__MINGW32__) || defined(_MSC_VER)) && !defined(LIBXMLXX_STATIC)
2123
# define LIBXMLPP_DLL 1

meson.build

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,12 @@ endif
325325

326326
# Static library?
327327
library_build_type = get_option('default_library')
328+
pkg_conf_data.set('LIBXMLXX_STATIC', library_build_type == 'static')
329+
328330

329331
if cpp_compiler.get_argument_syntax() == 'msvc'
330-
if library_build_type == 'static' or library_build_type == 'both'
331-
error('Static builds are not supported by MSVC-style builds')
332+
if library_build_type == 'both'
333+
error('Dynamic+Static builds are not supported by MSVC-style builds')
332334
endif
333335
endif
334336

0 commit comments

Comments
 (0)