File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,18 @@ target_include_directories(slick_shm INTERFACE
2323target_compile_features (slick_shm INTERFACE cxx_std_17)
2424
2525# Platform-specific linking
26- if (WIN32 )
27- # No special libraries needed on Windows
28- elseif (UNIX )
29- # Link with rt (realtime) for shm_open/shm_unlink on POSIX systems
26+ if (APPLE )
27+ # macOS doesn't need rt library (shm_open/shm_unlink are in libc)
3028 # pthread may be needed for some implementations
29+ find_package (Threads)
30+ if (Threads_FOUND)
31+ target_link_libraries (slick_shm INTERFACE Threads::Threads)
32+ endif ()
33+ elseif (UNIX )
34+ # Linux needs rt (realtime) for shm_open/shm_unlink
3135 target_link_libraries (slick_shm INTERFACE rt)
3236
33- # On some systems (older Linux), pthread is also needed
37+ # pthread may be needed for some implementations
3438 find_package (Threads)
3539 if (Threads_FOUND)
3640 target_link_libraries (slick_shm INTERFACE Threads::Threads)
You can’t perform that action at this time.
0 commit comments