Link atomic with target_link_libraries.
This commit is contained in:
parent
edb552df68
commit
62d87ab433
|
@ -132,11 +132,6 @@ endif()
|
|||
include(TdSetUpCompiler)
|
||||
td_set_up_compiler()
|
||||
|
||||
find_package(Atomics REQUIRED)
|
||||
if (ATOMICS_LIBRARIES)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ATOMICS_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
option(TD_ENABLE_MULTI_PROCESSOR_COMPILATION "Use \"ON\" to enable multi-processor compilation.")
|
||||
|
||||
|
|
|
@ -403,6 +403,11 @@ if (ANDROID)
|
|||
target_link_libraries(tdutils PRIVATE log)
|
||||
endif()
|
||||
|
||||
find_package(Atomics REQUIRED)
|
||||
if (ATOMICS_LIBRARIES)
|
||||
target_link_libraries(tdutils PUBLIC "${ATOMICS_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
install(TARGETS tdutils EXPORT TdStaticTargets
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
|
|
Loading…
Reference in New Issue