diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9676e2f0..210e280d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -131,7 +131,10 @@ endif() if (WIN32) target_link_libraries(core PRIVATE ole32 comctl32 ws2_32) elseif(NOT APPLE) - target_link_libraries(core PRIVATE rt) + check_library_exists(rt shm_open "" NEED_LIBRT) + if (NEED_LIBRT) + target_link_libraries(core PRIVATE rt) + endif() endif() if (ENABLE_JIT_PROFILING)