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

View File

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