From b007747dceee715bf3870ce861818eab5f03e48d Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 24 Feb 2020 02:00:43 +0300 Subject: [PATCH] Use separate CMake variable for td_api sources. GitOrigin-RevId: ed1828a2202a69c71e620bdf5a1883aa8799d35e --- CMakeLists.txt | 6 ++++-- td/generate/CMakeLists.txt | 10 +++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d4aba229..6fe7cd4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -266,9 +266,9 @@ if (NOT CMAKE_CROSSCOMPILING) if (TD_ENABLE_DOTNET) add_custom_target(remove_cpp_documentation WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" - COMMAND remove_documentation ${TL_TD_AUTO_SOURCE} td/telegram/Client.h td/telegram/Log.h td/tl/TlObject.h + COMMAND remove_documentation ${TL_TD_API_AUTO_SOURCE} td/telegram/Client.h td/telegram/Log.h td/tl/TlObject.h COMMENT "Remove C++ documentation from sources" - DEPENDS remove_documentation tl_generate_common generate_dotnet_api ${TL_TD_AUTO_SOURCE} td/telegram/Client.h td/telegram/Log.h td/tl/TlObject.h + DEPENDS remove_documentation tl_generate_common generate_dotnet_api ${TL_TD_API_AUTO_SOURCE} td/telegram/Client.h td/telegram/Log.h td/tl/TlObject.h ) add_dependencies(prepare_cross_compiling generate_dotnet_api remove_cpp_documentation) @@ -314,6 +314,7 @@ endif() #SOURCE SETS set_source_files_properties(${TL_TD_AUTO_SOURCE} PROPERTIES GENERATED TRUE) +set_source_files_properties(${TL_TD_API_AUTO_SOURCE} PROPERTIES GENERATED TRUE) if (TD_ENABLE_JNI OR ANDROID) set(TL_JNI_OBJECT_SOURCE td/tl/tl_jni_object.cpp @@ -325,6 +326,7 @@ endif() set(TL_TD_SCHEME_SOURCE ${TL_TD_AUTO_SOURCE} + ${TL_TD_API_AUTO_SOURCE} ${TL_JNI_OBJECT_SOURCE} td/tl/TlObject.h td/tl/tl_object_parse.h diff --git a/td/generate/CMakeLists.txt b/td/generate/CMakeLists.txt index 5303d9eb..62d7a665 100644 --- a/td/generate/CMakeLists.txt +++ b/td/generate/CMakeLists.txt @@ -15,9 +15,6 @@ set(TL_TD_AUTO_SOURCE ${TD_AUTO_INCLUDE_DIR}/mtproto/mtproto_api.cpp ${TD_AUTO_INCLUDE_DIR}/mtproto/mtproto_api.h ${TD_AUTO_INCLUDE_DIR}/mtproto/mtproto_api.hpp - ${TD_AUTO_INCLUDE_DIR}/telegram/td_api.cpp - ${TD_AUTO_INCLUDE_DIR}/telegram/td_api.h - ${TD_AUTO_INCLUDE_DIR}/telegram/td_api.hpp ${TD_AUTO_INCLUDE_DIR}/telegram/telegram_api.cpp ${TD_AUTO_INCLUDE_DIR}/telegram/telegram_api.h ${TD_AUTO_INCLUDE_DIR}/telegram/telegram_api.hpp @@ -27,6 +24,13 @@ set(TL_TD_AUTO_SOURCE PARENT_SCOPE ) +set(TL_TD_API_AUTO_SOURCE + ${TD_AUTO_INCLUDE_DIR}/telegram/td_api.cpp + ${TD_AUTO_INCLUDE_DIR}/telegram/td_api.h + ${TD_AUTO_INCLUDE_DIR}/telegram/td_api.hpp + PARENT_SCOPE +) + set(TL_TD_JSON_AUTO_SOURCE ${TD_AUTO_INCLUDE_DIR}/telegram/td_api_json.cpp ${TD_AUTO_INCLUDE_DIR}/telegram/td_api_json.h