aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e55335ec..f4358521 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,6 +86,20 @@ set(libqmatrixclient_SRCS
aux_source_directory(jobs/generated libqmatrixclient_job_SRCS)
+if (MATRIX_DOC_PATH AND APIGEN_PATH)
+ add_custom_target(update-api
+ ${APIGEN_PATH} --config jobs/apigen.yaml --out jobs/generated
+ ${MATRIX_DOC_PATH}/api/client-server
+ content-repo.yaml- cas_login_redirect.yaml- cas_login_ticket.yaml-
+ old_sync.yaml- room_initial_sync.yaml-
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ SOURCES jobs/apigen.yaml jobs/{{base}}.h.mustache jobs/{{base}}.cpp.mustache
+ VERBATIM
+ )
+endif()
+
+aux_source_directory(jobs/generated libqmatrixclient_job_SRCS)
+
set(example_SRCS examples/qmc-example.cpp)
add_library(qmatrixclient ${libqmatrixclient_SRCS} ${libqmatrixclient_job_SRCS})