The configuration header should remain private.
---
SConstruct | 14 +++++++++++---
cli/cli.c | 1 +
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/SConstruct b/SConstruct
index d0508d0..ca4313a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -98,7 +98,7 @@ if f265_cfg['libav'] == 'new': new_str = ""
perf_str = comment
if f265_cfg['perf']: perf_str = ""
-s = ("#ifndef F265_CONFIG_H\n"
+s_config = ("#ifndef F265_CONFIG_H\n"
"#define F265_CONFIG_H\n"
"\n"
"// Defined if stdint.h is available.\n"
@@ -133,14 +133,22 @@ s = ("#ifndef F265_CONFIG_H\n"
"// Defined if new libavcodec/libavformat are installed.\n"
"%s#define F265_USE_NEW_LIBAV\n"
"\n"
+ "#endif") % (lbd_str, hbd_str, asm_str, fast_c_str, perf_str, no_str,
old_str, new_str)
+
+s_ver = ("#ifndef F265_VERSION_H\n"
+ "#define F265_VERSION_H\n"
+ "\n"
"// Version number.\n"
"#define F265_VERSION \"%s\"\n"
"\n"
- "#endif") % (lbd_str, hbd_str, asm_str, fast_c_str, perf_str, no_str,
old_str, new_str, F265_VERSION)
+ "#endif /* F265_VERSION */") % (F265_VERSION)
if not os.path.isdir('build/f265'): Execute(Mkdir('build/f265'))
-write_file('build/f265/f265_config.h.tmp', s)
+write_file('build/f265/f265_config.h.tmp', s_config)
f265_cfg.Command('build/f265/f265_config.h', 'build/f265/f265_config.h.tmp',
"cp $SOURCES $TARGETS")
+write_file('build/f265/version.h.tmp', s_ver)
+f265_cfg.Command('build/f265/version.h', 'build/f265/version.h.tmp',
+ "cp $SOURCES $TARGETS")
# Compile bit depth independent code.
bdi_c_files = ['bdi.c', 'bdi_ro.c', 'parse.c']
diff --git a/cli/cli.c b/cli/cli.c
index fee2821..32b95dd 100644
--- a/cli/cli.c
+++ b/cli/cli.c
@@ -13,6 +13,7 @@
#include <getopt.h>
#include <ctype.h>
#include "f265/f265.h"
+#include "f265/version.h"
#ifdef F265_PERF_BENCHMARK
#include "f265/perf.h"
--
1.9.0
--
To unsubscribe visit http://f265.org
or send a mail to [email protected].