blob: 87b237c7dd5600e35499472127221ff2803f3c16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -63,11 +63,17 @@ if(WIN32)
endif()
endif()
+option(LINK_WITH_ATOMIC "Add 'atomic' if needed" OFF)
+set(atomic_lib "")
+if(LINK_WITH_ATOMIC)
+ set(atomic_lib "atomic")
+endif()
+
find_package(Threads REQUIRED)
target_link_libraries(
ccache_lib
PRIVATE standard_settings standard_warnings ZSTD::ZSTD
- Threads::Threads third_party_lib)
+ Threads::Threads third_party_lib ${atomic_lib})
target_include_directories(ccache_lib PRIVATE ${CMAKE_BINARY_DIR} .)
|