Update CMakeLists.txt

This commit is contained in:
Andrea Cavalli 2020-12-26 17:30:31 +01:00
parent 3817c4f634
commit 68c9a14e8d

View File

@ -95,15 +95,6 @@ set(TL_GENERATE_JSON_SOURCE
if (NOT CMAKE_CROSSCOMPILING) if (NOT CMAKE_CROSSCOMPILING)
# Start of .tlo update # Start of .tlo update
if (WIN32 OR CYGWIN)
add_custom_target(build_tl_parser
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tl-parser/contrib/vs/
COMMAND cmd /C msbuild tl-parser.sln -t:Rebuild -p:Configuration=Release
COMMENT "Build tl-parser"
DEPENDS scheme/mtproto_api.tl scheme/telegram_api.tl scheme/secret_api.tl scheme/td_api.tl
)
set(TL_PARSER_BIN "${CMAKE_CURRENT_SOURCE_DIR}/tl-parser/contrib/vs/build/x64/Release/tl-parser")
else()
add_custom_target(prepare_tl_parser ALL add_custom_target(prepare_tl_parser ALL
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_SOURCE_DIR}/tl-parser/build) COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_SOURCE_DIR}/tl-parser/build)
add_custom_target(configure_tl_parser add_custom_target(configure_tl_parser
@ -121,6 +112,10 @@ if (NOT CMAKE_CROSSCOMPILING)
DEPENDS scheme/mtproto_api.tl scheme/telegram_api.tl scheme/secret_api.tl scheme/td_api.tl 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_dependencies(build_tl_parser configure_tl_parser)
if (WIN32 OR CYGWIN)
set(TL_PARSER_BIN "${CMAKE_CURRENT_SOURCE_DIR}/tl-parser/build/Debug/tl-parser")
else()
set(TL_PARSER_BIN ./tl-parser/build/tl-parser) set(TL_PARSER_BIN ./tl-parser/build/tl-parser)
endif() endif()