aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/CMakeLists.txt
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-04-24 18:46:43 +0200
committerJay Berkenbilt <ejb@ql.org>2022-04-24 19:06:16 +0200
commit63c5a56f38f51c4e1f0226721eae59a9201fed0e (patch)
tree1f6e6a8f4c6f1200ca8b75677480abaacccdfb01 /libqpdf/CMakeLists.txt
parent08ba21cf4935fec39d3454714c03d36ff6a6b836 (diff)
downloadqpdf-63c5a56f38f51c4e1f0226721eae59a9201fed0e.tar.zst
Fix build logic around generate_auto_job
It was being run at configuration time, not build time.
Diffstat (limited to 'libqpdf/CMakeLists.txt')
-rw-r--r--libqpdf/CMakeLists.txt22
1 files changed, 20 insertions, 2 deletions
diff --git a/libqpdf/CMakeLists.txt b/libqpdf/CMakeLists.txt
index e2dffbd3..fc393a87 100644
--- a/libqpdf/CMakeLists.txt
+++ b/libqpdf/CMakeLists.txt
@@ -1,8 +1,26 @@
+set(auto_job_inputs
+ # Keep in sync with SOURCES in generate_auto_job
+ ../generate_auto_job
+ ../manual/_ext/qpdf.py
+ ../job.yml
+ ../manual/cli.rst)
+
+set(auto_job_outputs
+ # Keep in sync with DESTS in generate_auto_job
+ qpdf/auto_job_decl.hh
+ qpdf/auto_job_init.hh
+ qpdf/auto_job_help.hh
+ qpdf/auto_job_schema.hh
+ qpdf/auto_job_json_decl.hh
+ qpdf/auto_job_json_init.hh)
if(GENERATE_AUTO_JOB)
- execute_process(
+ add_custom_command(
+ OUTPUT ${auto_job_outputs}
COMMAND ${qpdf_SOURCE_DIR}/generate_auto_job --generate
- WORKING_DIRECTORY ${qpdf_SOURCE_DIR})
+ WORKING_DIRECTORY ${qpdf_SOURCE_DIR}
+ DEPENDS ${auto_job_inputs})
+ add_custom_target(auto_job_files ALL DEPENDS ${auto_job_outputs})
endif()
set(libqpdf_crypto_native