From 12ef73c8e76185f9b78e844ea673025f56a959ab Mon Sep 17 00:00:00 2001 From: Floris Bruynooghe Date: Sat, 27 Apr 2019 12:31:03 +0300 Subject: [PATCH] Provide deltachat/deltachat.h in builddir This makes sure that there is a deltachat/deltacht.h file in the build directory before it is installed. This allows code to to #include when building against an uninstalled library just like they would for building against an installed library. --- deltachat/meson.build | 8 ++++++++ meson.build | 2 ++ 2 files changed, 10 insertions(+) create mode 100644 deltachat/meson.build diff --git a/deltachat/meson.build b/deltachat/meson.build new file mode 100644 index 00000000..b1ead0b1 --- /dev/null +++ b/deltachat/meson.build @@ -0,0 +1,8 @@ +# This source directory only exists so we can have a +# deltachat/deltachat.h in the build directory. This allows C code to +# always `#include ` even to build against an +# uninstalled library by -I to point at the build directory. +configure_file(input: '../src/deltachat.h', + output: 'deltachat.h', + copy: true, + install: false) diff --git a/meson.build b/meson.build index dfec6336..8f2040b0 100644 --- a/meson.build +++ b/meson.build @@ -128,6 +128,8 @@ else netpgp = netpgp_proj.get_variable('dep') endif +# Provide deltachat/deltachat.h in the build directory +subdir('deltachat') # Build the library, stored in `lib`. subdir('src')