Skip to content
This repository has been archived by the owner on Nov 25, 2022. It is now read-only.

Commit

Permalink
Add support in meson to conditionally use rpgp
Browse files Browse the repository at this point in the history
  • Loading branch information
Floris Bruynooghe authored and r10s committed Mar 12, 2019
1 parent f93d200 commit 00ab1c3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
14 changes: 10 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ math = cc.find_library('m')
# this as well.
zlib = dependency('zlib', fallback: ['zlib', 'zlib_dep'])

# add rpgp
rpgp = cc.find_library('rpgp')

if not get_option('monolith')
# Normal build, detect dependencies from pkg-config
openssl = dependency('openssl', fallback: ['openssl', 'dep'])
Expand Down Expand Up @@ -110,7 +107,6 @@ else
etpan = etpan_proj.get_variable('dep')
endif


# netpgp is always bundled
netpgp_proj = subproject('netpgp',
default_options: ['static-pic-lib=true',
Expand All @@ -119,6 +115,16 @@ netpgp_proj = subproject('netpgp',
'openssl-camellia=enabled'])
netpgp = netpgp_proj.get_variable('dep')

if get_option('rpgp')
# The rpgp pkg-config file is currently incorrect, so just try
# linking it instead for now.
#rpgp = dependency('rpgp')
rpgp = cc.find_library('rpgp')
add_project_arguments('-DDC_USE_RPGP', language: 'c')
else
rpgp = dependency('', required: false)
endif


# Build the library, stored in `lib`.
subdir('src')
Expand Down
6 changes: 6 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,9 @@ option(
value: false,
description: 'Use bundled libetpan, as it ignores --wrap-mode=forcefallback'
)
option(
'rpgp',
type: 'boolean',
value: false,
description: '[experimental] Build with rpgp instead of netpgp'
)

0 comments on commit 00ab1c3

Please sign in to comment.