From 6724a362c3bdda5b305bf54d092565fe5b1facac Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Mon, 2 May 2022 09:53:09 -0400 Subject: Move generate_auto_job to the top-level CMakeLists.txt --- CMakeLists.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index b043c629..72bf5a95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -280,6 +280,31 @@ if(WIN32) include(InstallRequiredSystemLibraries) endif() +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 + libqpdf/qpdf/auto_job_decl.hh + libqpdf/qpdf/auto_job_init.hh + libqpdf/qpdf/auto_job_help.hh + libqpdf/qpdf/auto_job_schema.hh + libqpdf/qpdf/auto_job_json_decl.hh + libqpdf/qpdf/auto_job_json_init.hh) + +if(GENERATE_AUTO_JOB) + add_custom_command( + OUTPUT ${auto_job_outputs} + COMMAND ${qpdf_SOURCE_DIR}/generate_auto_job --generate + WORKING_DIRECTORY ${qpdf_SOURCE_DIR} + DEPENDS ${auto_job_inputs}) + add_custom_target(auto_job_files ALL DEPENDS ${auto_job_outputs}) +endif() + # add_subdirectory order affects test order add_subdirectory(include) add_subdirectory(libqpdf) -- cgit v1.2.3-70-g09d2