diff --git a/CMakeLists.txt b/CMakeLists.txt index ff1f2ba8a..69daa323d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,6 +34,10 @@ else() add_definitions(-D__STDC_FORMAT_MACROS) endif() +if(${CMAKE_SYSTEM_NAME} STREQUAL Linux) + list(APPEND DEPLIBS "atomic") +endif() + # Sources to build # (use add_dir_sources function to add source/header files from the CMakeLists files of subdirectories) add_subdirectory(src) diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index 9c163249e..f16e0455a 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -53,7 +53,7 @@ add_executable(${BINARY} ../utils/XMLUtils.cpp ) -if(LINUX) +if(${CMAKE_SYSTEM_NAME} STREQUAL Linux) SET(ADD_LINK_LIBS "atomic") endif()