Commit 1b69fb9bdb78265707b00e97ab274c42a2334670

Xavier Claessens 2020-10-26T11:25:08

* meson.build: Set project version.

diff --git a/ChangeLog b/ChangeLog
index 8f81b09..d5521c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-02-09  Xavier Claessens  <xavier.claessens@collabora.com>
+
+	* meson.build: Set project version.
+
 2021-02-04  Werner Lemberg  <wl@gnu.org>
 
 	[base] Fix Netpbm tracing message.
diff --git a/meson.build b/meson.build
index 339492c..dac0e6b 100644
--- a/meson.build
+++ b/meson.build
@@ -13,9 +13,10 @@
 
 
 project('freetype2', 'c',
-  version: '2.10.4',
   meson_version: '>= 0.55.0',
   default_options: ['default_library=both'],
+  version: run_command('builds/meson/extract_freetype_version.py',
+                       'include/freetype/freetype.h').stdout().strip(),
 )
 
 #
@@ -29,10 +30,6 @@ project('freetype2', 'c',
 python = import('python')
 python_exe = python.find_installation(required: true)
 
-ft2_version = run_command(python_exe,
-  files('builds/meson/extract_freetype_version.py'),
-  files('include/freetype/freetype.h')).stdout().strip()
-
 ft2_so_version = run_command(python_exe,
   files('builds/meson/extract_libtool_version.py'),
   '--soversion',
@@ -378,7 +375,7 @@ gen_docs = custom_target('freetype2 reference documentation',
   input: ft2_public_headers + ft2_config_headers,
   command: [python_exe,
     files('builds/meson/generate_reference_docs.py'),
-    '--version=' + ft2_version,
+    '--version=' + meson.project_version(),
     '--input-dir=' + meson.source_root(),
     '--output-dir=@OUTPUT@'
   ],