Skip to content

Commit

Permalink
Merge pull request #99 from neheb/conf
Browse files Browse the repository at this point in the history
meson: add cmake variable handling
  • Loading branch information
antony-jr committed Dec 20, 2023
2 parents e67bdb5 + 4200caa commit 1467a3e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@ else
endif
libarchive_dep = dependency('libarchive')

vers = meson.project_version().split('.')
cdata = configuration_data()
cdata.set('PROJECT_VERSION', meson.project_version())
cdata.set('PROJECT_VERSION_MAJOR', vers[0])
cdata.set('PROJECT_VERSION_MINOR', vers[1])
cdata.set('PROJECT_VERSION_PATCH', vers[2])
cdata.set('QARCHIVE_STATIC', get_option('default_library') == 'static')

conf = configure_file(
format: 'cmake@',
input: 'other/cmake/config.h.in',
output: 'config.h',
configuration: configuration_data({'QARCHIVE_STATIC': get_option('default_library') == 'static'}),
configuration: cdata,
)

src = files(
Expand Down

0 comments on commit 1467a3e

Please sign in to comment.