Hack to make sure the right things are rebuilt when grok headers change.
authorCarl Hetherington <cth@carlh.net>
Tue, 26 Sep 2023 18:46:08 +0000 (20:46 +0200)
committerCarl Hetherington <cth@carlh.net>
Sat, 16 Dec 2023 01:07:38 +0000 (02:07 +0100)
wscript

diff --git a/wscript b/wscript
index ea7aadacc49ec4738b58b5512a527bb30d5f257d..cad24b4241543ff91a8e67a3758bbd55b9ee758b 100644 (file)
--- a/wscript
+++ b/wscript
@@ -622,6 +622,18 @@ def configure(conf):
 def build(bld):
     create_version_cc(VERSION, bld.env.CXXFLAGS)
 
+    # waf can't find these dependencies by itself because they are only included if DCPOMATIC_GROK is defined,
+    # and I can't find a way to pass that to waf's dependency scanner
+    if bld.env.ENABLE_GROK:
+        for dep in (
+                'src/lib/j2k_encoder.cc',
+                'src/tools/dcpomatic.cc',
+                'src/tools/dcpomatic_server.cc',
+                'src/tools/dcpomatic_server_cli.cc',
+                'src/tools/dcpomatic_batch.cc'
+        ):
+            bld.add_manual_dependency(bld.path.find_node(dep), bld.path.find_node('src/lib/grok/context.h'))
+
     bld.recurse('src')
     bld.recurse('graphics')