Fix tl_writer_cpp build definitions.

This commit is contained in:
levlam 2024-06-04 13:27:07 +03:00
parent cc02215c5f
commit b102c3adef

View File

@ -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 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
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)