Update CMakeLists.txt and tl-parser

This commit is contained in:
Andrea Cavalli 2020-10-25 11:41:02 +01:00
parent b7d5e480f7
commit 120c990e8d
2 changed files with 23 additions and 14 deletions

View File

@ -122,20 +122,29 @@ if (NOT CMAKE_CROSSCOMPILING)
endif()
# Start of .tlo update
add_custom_target(configure_tl_parser
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tl-parser
COMMAND bash ./configure
COMMENT "Configure tl-parser"
DEPENDS scheme/mtproto_api.tl scheme/telegram_api.tl scheme/secret_api.tl scheme/td_api.tl
)
if (WIN32 OR CYGWIN)
add_custom_target(build_tl_parser
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tl-parser/contrib/vs/
COMMAND "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\MSBuild\\Current\\Bin\\MSBuild.exe" .\tl-parser.sln
COMMENT "Build tl-parser"
DEPENDS scheme/mtproto_api.tl scheme/telegram_api.tl scheme/secret_api.tl scheme/td_api.tl
)
else()
add_custom_target(configure_tl_parser
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tl-parser
COMMAND bash ./configure
COMMENT "Configure tl-parser"
DEPENDS scheme/mtproto_api.tl scheme/telegram_api.tl scheme/secret_api.tl scheme/td_api.tl
)
add_custom_target(build_tl_parser
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tl-parser
COMMAND make
COMMENT "Build tl-parser"
DEPENDS scheme/mtproto_api.tl scheme/telegram_api.tl scheme/secret_api.tl scheme/td_api.tl
)
add_dependencies(build_tl_parser configure_tl_parser)
add_custom_target(build_tl_parser
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tl-parser
COMMAND make
COMMENT "Build tl-parser"
DEPENDS scheme/mtproto_api.tl scheme/telegram_api.tl scheme/secret_api.tl scheme/td_api.tl
)
add_dependencies(build_tl_parser configure_tl_parser)
endif()
add_custom_target(generate_mtproto_api_tlo
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

@ -1 +1 @@
Subproject commit f49077de7f7aa5721483c5686182deebad5e78dd
Subproject commit 967e4dfad93ca8941fc61a23f4418e7fc3bd5b96