Skip to content

Commit

Permalink
Merge pull request #3 from nazar-pc/patch-1
Browse files Browse the repository at this point in the history
Meson build system support by @nazar-pc
  • Loading branch information
alex85k authored Oct 30, 2021
2 parents fed839a + ff23e77 commit effe6e2
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
project(
'wingetopt',
'c',
version: '0.95',
license : ['ISC', 'BSD-3-Clause'],
meson_version: '>= 0.55',
default_options: [
'warning_level=1',
],
)

compiler = meson.get_compiler('c')

c_args = []

if compiler.get_id() == 'msvc'
c_args += [
'-D_CRT_SECURE_NO_WARNINGS',
]

if get_option('default_library') == 'shared'
c_args += [
'-DBUILDING_WINGETOPT_DLL',
'-DWINGETOPT_SHARED_LIB',
]
endif
endif

wingetopt_lib = library(
'wingetopt',
'src/getopt.c',
include_directories: include_directories(
'src',
),
c_args: c_args,
)

wingetopt_dep = declare_dependency(
link_with: wingetopt_lib,
include_directories: include_directories(
'src',
),
)

0 comments on commit effe6e2

Please sign in to comment.