summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorAdam Szmigin <smidge@xsco.net>2020-10-06 14:24:06 +0100
committerGitHub <noreply@github.com>2020-10-06 14:24:06 +0100
commitfe21c4d6dae9f14a7a2097dce0d7b5a7d84178d5 (patch)
tree3680042c5f8a0981db070c21b76c26f98848bd16 /meson.build
parent2fb8d7e1811090bcea1ab204407936b408fa5ec3 (diff)
parent9d1fbbbc96705410a662af5858ca4df8a40796e9 (diff)
Merge pull request #31 from xsco/fix/msvc-static-lib-build
Fix static builds on MSVC
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 6 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index ea2e18d..ad10f25 100644
--- a/meson.build
+++ b/meson.build
@@ -1,9 +1,9 @@
project(
'djinterop',
'cpp', 'c',
- version: '0.14.1',
+ version: '0.14.2',
license: 'LGPL-3.0',
- default_options: ['cpp_std=c++17', 'default_library=both'])
+ default_options: ['cpp_std=c++17', 'default_library=shared'])
cpp_compiler = meson.get_compiler('cpp')
@@ -13,10 +13,13 @@ if cpp_compiler.get_id() == 'msvc'
endif
# Set hidden visibility arguments for everything the project, if available.
-if get_option('default_library') != 'static'
+default_library_type = get_option('default_library')
+if default_library_type != 'static'
if cpp_compiler.has_argument('-fvisibility=hidden')
add_global_arguments('-fvisibility=hidden', language: ['c', 'cpp'])
endif
+else
+ add_global_arguments('-DDJINTEROP_STATIC', language: 'cpp')
endif