File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed
Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change 11# Project dependencies
2+ find_package (PkgConfig REQUIRED)
3+
4+ find_package (Threads REQUIRED)
5+ find_package (Atomic REQUIRED)
Original file line number Diff line number Diff line change 1+ # Try to find libatomic
2+ # Once done, this will define
3+ #
4+ # ATOMIC_FOUND - system has libatomic
5+ # ATOMIC_LIBRARIES - libraries needed to use libatomic
6+ #
7+
8+ find_library (ATOMIC_LIBRARY
9+ NAMES atomic libatomic.so.1
10+ HINTS ${ATOMIC_ROOT}
11+ ${CMAKE_INSTALL_LIBDIR} )
12+
13+ include (FindPackageHandleStandardArgs)
14+ find_package_handle_standard_args (Atomic
15+ REQUIRED_VARS ATOMIC_LIBRARY
16+ )
17+
18+ if (ATOMIC_FOUND AND NOT TARGET atomic::atomic)
19+ add_library (atomic::atomic STATIC IMPORTED )
20+ set_target_properties (atomic::atomic PROPERTIES
21+ IMPORTED_LOCATION "${ATOMIC_LIBRARY} "
22+ INTERFACE_INCLUDE_DIRECTORIES "${ATOMIC_INCLUDE_DIR} " )
23+ target_compile_definitions (atomic::atomic INTERFACE UNWIND_FOUND)
24+ else ()
25+ message (CRITICAL "Notice: atomic not found" )
26+ add_library (atomic::atomic INTERFACE IMPORTED )
27+ endif ()
28+
29+ unset (ATOMIC_LIBRARY)
You can’t perform that action at this time.
0 commit comments