1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-06-23 21:45:30 +00:00

build: use pgp and otr deps correctly

* Used the wrong define BUILD_PGP instead of HAVE_LIBGPGME
* Need to add the sources conditionally
This commit is contained in:
Michael Vetter 2021-12-01 18:38:39 +01:00
parent 795c07cfb0
commit 46857e84c9
2 changed files with 19 additions and 2 deletions

View File

@ -57,7 +57,7 @@ if otr_dep.found()
endif
pgp_dep = dependency('gpgme', required : get_option('pgp'))
if pgp_dep.found()
conf.set_quoted('BUILD_PGP', '1')
conf.set_quoted('HAVE_LIBGPGME', '1')
endif
# TODO: HAVE_LIBSIGNAL_LT_2_3_2
omemo_libsignal_dep = dependency('libsignal-protocol-c', version: '>= 2.3.2', required : get_option('pgp'))
@ -96,7 +96,7 @@ subdir('src')
# TODO: output build info
profanity = executable('profanity',
core_sources_c,
sources,
dependencies : [ glib_dep,
gio_dep,
curl_dep,

View File

@ -1,3 +1,4 @@
# main sources
core_sources_c = [ 'src/main.c',
'src/profanity.c',
'src/log.c',
@ -73,4 +74,20 @@ core_sources_c = [ 'src/main.c',
config_h
]
sources = core_sources_c
incdir = include_directories('.', 'command', 'config', 'ui', 'plugins', 'xmpp')
# optional sources
if pgp_dep.found()
sources += 'src/pgp/gpg.c'
endif
if otr_dep.found()
otr_sources = [ 'src/otr/otrlibv4.c',
'src/otr/otr.c',
]
incdir += include_directories('otr')
sources += otr_sources
endif