From dd580f7a03abc6a2616d3889b62341c0e4516b4b Mon Sep 17 00:00:00 2001 From: jesperpedersen Date: Wed, 4 Jan 2023 13:28:30 -0500 Subject: [PATCH] [#347] Link to libatomic on Linux --- CMakeLists.txt | 14 +++++++------- src/CMakeLists.txt | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c62cd64d..2f8320a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,14 +77,14 @@ else () message(FATAL_ERROR "rst2man needed") endif() -find_package(Libatomic) -if (LIBATOMIC_FOUND) - message(STATUS "libatomic found") -else () - message(FATAL_ERROR "libatomic needed") -endif() - if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + find_package(Libatomic) + if (LIBATOMIC_FOUND) + message(STATUS "libatomic found") + else () + message(FATAL_ERROR "libatomic needed") + endif() + find_package(Systemd) if (SYSTEMD_FOUND) message(STATUS "systemd found") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3f47479a..616a7aa7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -65,7 +65,6 @@ else() link_libraries( ${LIBEV_LIBRARIES} ${OPENSSL_LIBRARIES} - ${LIBATOMIC_LIBRARY} ) endif()