Do not tdactor example executable when cross-compiling.

GitOrigin-RevId: a3bc7956826bb51ac114712ad0874cbc2b2a5cf2
This commit is contained in:
levlam 2019-11-18 00:03:03 +03:00
parent fcb96bd3ff
commit fe6a635ebf
1 changed files with 4 additions and 2 deletions

View File

@ -45,8 +45,10 @@ add_library(tdactor STATIC ${TDACTOR_SOURCE})
target_include_directories(tdactor PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_link_libraries(tdactor PUBLIC tdutils)
add_executable(example example/example.cpp)
target_link_libraries(example PRIVATE tdactor)
if (NOT CMAKE_CROSSCOMPILING)
add_executable(example example/example.cpp)
target_link_libraries(example PRIVATE tdactor)
endif()
install(TARGETS tdactor EXPORT TdTargets
LIBRARY DESTINATION lib