Skip to content

Commit

Permalink
Do not build examples and contrib by default
Browse files Browse the repository at this point in the history
Use "meson setup builddir -Denable-extras=true" to also build:
- examples/scardcontrol
- contrib/Kobil_mIDentity_switch
- contrib/RSA_SecurID

Thanks to Martin Paljak for the idea
" Do not build contrib and examples by default but require #4 "
#4
  • Loading branch information
LudovicRousseau committed Nov 26, 2024
1 parent bbc733f commit b5ae786
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 21 deletions.
44 changes: 23 additions & 21 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -152,27 +152,29 @@ executable('parse',
dependencies : [libusb_dep, pcsc_cflags, zlib_dep, threads_dep],
)

# scardcontrol
scardcontrol_src = [
'examples/scardcontrol.c',
'examples/PCSCv2part10.c',
]
executable('scardcontrol',
scardcontrol_src,
dependencies : [pcsc_dep],
)

# contrib Kobil_mIDentity_switch
executable('Kobil_mIDentity_switch',
'contrib/Kobil_mIDentity_switch/Kobil_mIDentity_switch.c',
dependencies : [libusb_dep],
)

# contrib RSA_SecurID_getpasswd
executable('RSA_SecurID_getpasswd',
'contrib/RSA_SecurID/RSA_SecurID_getpasswd.c',
dependencies : [pcsc_dep],
)
if get_option('enable-extras')
# examples scardcontrol
scardcontrol_src = [
'examples/scardcontrol.c',
'examples/PCSCv2part10.c',
]
executable('scardcontrol',
scardcontrol_src,
dependencies : [pcsc_dep],
)

# contrib Kobil_mIDentity_switch
executable('Kobil_mIDentity_switch',
'contrib/Kobil_mIDentity_switch/Kobil_mIDentity_switch.c',
dependencies : [libusb_dep],
)

# contrib RSA_SecurID_getpasswd
executable('RSA_SecurID_getpasswd',
'contrib/RSA_SecurID/RSA_SecurID_getpasswd.c',
dependencies : [pcsc_dep],
)
endif

# Info.plist
command = [
Expand Down
5 changes: 5 additions & 0 deletions meson.options
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ option('zlp',
type : 'boolean',
value : false,
description : 'enable the Zero Length Packet patch for some Gemalto readers')

option('enable-extras',
type : 'boolean',
value : false,
description : 'also compile examples and contrib')

0 comments on commit b5ae786

Please sign in to comment.