From b102c3adef5428142671b51d1989ce00ce7a4525 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 4 Jun 2024 13:27:07 +0300 Subject: [PATCH] Fix tl_writer_cpp build definitions. --- td/generate/CMakeLists.txt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/td/generate/CMakeLists.txt b/td/generate/CMakeLists.txt index de52cb994..07f46c3bb 100644 --- a/td/generate/CMakeLists.txt +++ b/td/generate/CMakeLists.txt @@ -142,6 +142,12 @@ if (NOT CMAKE_CROSSCOMPILING) add_library(tl_writer_cpp STATIC ${TL_WRITER_CPP_SOURCE}) target_link_libraries(tl_writer_cpp PRIVATE tdtl) target_include_directories(tl_writer_cpp PUBLIC $) + if (TD_ENABLE_JNI) + target_compile_definitions(tl_writer_cpp PRIVATE TD_ENABLE_JNI=1) + endif() + if (TD_ENABLE_DOTNET) + target_compile_definitions(tl_writer_cpp PRIVATE DISABLE_HPP_DOCUMENTATION=1) + endif() add_executable(generate_mtproto ${TL_GENERATE_MTPROTO_SOURCE}) target_link_libraries(generate_mtproto PRIVATE tdtl tl_writer_cpp) @@ -163,9 +169,6 @@ if (NOT CMAKE_CROSSCOMPILING) if (TD_ENABLE_JNI) target_compile_definitions(generate_common PRIVATE TD_ENABLE_JNI=1) endif() - if (TD_ENABLE_DOTNET) - target_compile_definitions(generate_common PRIVATE DISABLE_HPP_DOCUMENTATION=1) - endif() add_executable(generate_c ${TL_GENERATE_C_SOURCE}) target_link_libraries(generate_c PRIVATE tdtl)