summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2021-06-19 18:19:11 +0200
committerJens Georg <mail@jensge.org>2021-06-19 18:19:11 +0200
commitc3a2aff7aa7f692bdc1b6f7f6b702c74c8e534e7 (patch)
tree1020b015bddfd85d5ea3b7d12fe93676e4f438e2
parent977084282582a4707c873b3c6540efe8840fb3a7 (diff)
downloadgssdp-c3a2aff7aa7f692bdc1b6f7f6b702c74c8e534e7.tar.gz
build: Move config.h to private subdirectory
This is necessary for using it as a submodule, see https://mesonbuild.com/Wrap-best-practices-and-tips.html#do-not-put-configh-in-external-search-path
-rw-r--r--internal/meson.build5
-rw-r--r--meson.build6
2 files changed, 7 insertions, 4 deletions
diff --git a/internal/meson.build b/internal/meson.build
new file mode 100644
index 0000000..583ce8f
--- /dev/null
+++ b/internal/meson.build
@@ -0,0 +1,5 @@
+config_h = configure_file(output : 'config.h', configuration : conf)
+config_header = declare_dependency(
+ compile_args : '-DHAVE_CONFIG_H=1',
+ include_directories: include_directories('.')
+)
diff --git a/meson.build b/meson.build
index 6f327e8..7e9ad13 100644
--- a/meson.build
+++ b/meson.build
@@ -36,11 +36,9 @@ siocgifindex_available = cc.compiles(siocgifindex_test,
name : 'SIOCGIFINDEX is available')
conf.set('HAVE_SIOCGIFINDEX', siocgifindex_available)
-configure_file(output : 'config.h', configuration : conf)
+subdir('internal')
-add_project_arguments('-DHAVE_CONFIG_H=1', language : 'c')
-
-system_deps = []
+system_deps = [config_header]
# Check whether we are compiling against Android libc
bionic_test = '''#include <sys/cdefs.h>