Fix include directories for tdjson.

GitOrigin-RevId: c9e712ec2c128eed2a6dd59da211eb5b3ba43358
This commit is contained in:
levlam 2018-03-04 15:27:12 +03:00
parent a4817a41a3
commit d67c5ada3c

View File

@ -662,7 +662,9 @@ include(GenerateExportHeader)
add_library(tdjson SHARED ${TD_JSON_SOURCE} ${TD_JSON_HEADERS}) add_library(tdjson SHARED ${TD_JSON_SOURCE} ${TD_JSON_HEADERS})
target_link_libraries(tdjson PRIVATE tdjson_private) target_link_libraries(tdjson PRIVATE tdjson_private)
generate_export_header(tdjson EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/td/telegram/tdjson_export.h) generate_export_header(tdjson EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/td/telegram/tdjson_export.h)
target_include_directories(tdjson PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>) target_include_directories(tdjson PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
if (APPLE) if (APPLE)
set_target_properties(tdjson PROPERTIES LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/tdclientjson_export_list") set_target_properties(tdjson PROPERTIES LINK_FLAGS "-Wl,-exported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/tdclientjson_export_list")
endif() endif()
@ -670,7 +672,9 @@ endif()
add_library(tdjson_static STATIC ${TD_JSON_SOURCE} ${TD_JSON_HEADERS}) add_library(tdjson_static STATIC ${TD_JSON_SOURCE} ${TD_JSON_HEADERS})
target_link_libraries(tdjson_static PRIVATE tdjson_private) target_link_libraries(tdjson_static PRIVATE tdjson_private)
target_compile_definitions(tdjson_static PUBLIC TDJSON_STATIC_DEFINE) target_compile_definitions(tdjson_static PUBLIC TDJSON_STATIC_DEFINE)
target_include_directories(tdjson_static PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>) target_include_directories(tdjson_static PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
set(BIGOBJ) set(BIGOBJ)
if (WIN32 OR CYGWIN) if (WIN32 OR CYGWIN)