aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 463bfea7..c0ffc0b0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,11 @@ if (CMAKE_BUILD_TYPE)
endif(CMAKE_BUILD_TYPE)
message( STATUS "Using compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}" )
message( STATUS "Using Qt ${Qt5_VERSION} at ${Qt5_Prefix}" )
+if (MATRIX_DOC_PATH AND GTAD_PATH)
+ message( STATUS "Generating API stubs enabled" )
+ message( STATUS " Using GTAD at ${GTAD_PATH}" )
+ message( STATUS " Using CS API files at ${MATRIX_DOC_PATH}/api/client-server" )
+endif ()
message( STATUS "=============================================================================" )
message( STATUS )
@@ -60,6 +65,7 @@ set(libqmatrixclient_SRCS
events/roomavatarevent.cpp
events/typingevent.cpp
events/receiptevent.cpp
+ jobs/requestdata.cpp
jobs/basejob.cpp
jobs/checkauthmethods.cpp
jobs/sendeventjob.cpp
@@ -68,8 +74,33 @@ set(libqmatrixclient_SRCS
jobs/roommessagesjob.cpp
jobs/syncjob.cpp
jobs/mediathumbnailjob.cpp
+ jobs/downloadfilejob.cpp
)
+set(API_DEF_PATH ${MATRIX_DOC_PATH}/api/client-server/)
+file(GLOB_RECURSE API_DEFS RELATIVE ${PROJECT_SOURCE_DIR}
+ ${API_DEF_PATH}/*.yaml
+ ${API_DEF_PATH}/definitions/*.yaml
+ ${MATRIX_DOC_PATH}/event-schemas/schema/*
+)
+if (MATRIX_DOC_PATH AND GTAD_PATH)
+ add_custom_target(update-api
+ ${GTAD_PATH} --config jobs/gtad.yaml --out jobs/generated
+ ${MATRIX_DOC_PATH}/api/client-server
+ cas_login_redirect.yaml- cas_login_ticket.yaml-
+ old_sync.yaml- room_initial_sync.yaml-
+ sync.yaml- room_state.yaml-
+ event_context.yaml- joining.yaml-
+ notifications.yaml- peeking_events.yaml-
+ pushrules.yaml- rooms.yaml- search.yaml-
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
+ SOURCES jobs/gtad.yaml
+ jobs/{{base}}.h.mustache jobs/{{base}}.cpp.mustache
+ ${API_DEFS}
+ VERBATIM
+ )
+endif()
+
aux_source_directory(jobs/generated libqmatrixclient_job_SRCS)
set(example_SRCS examples/qmc-example.cpp)