diff --git a/tool/CMakeLists.txt b/tool/CMakeLists.txt index 79077455..2d706baf 100644 --- a/tool/CMakeLists.txt +++ b/tool/CMakeLists.txt @@ -19,5 +19,10 @@ add_executable( if (APPLE OR WIN32 OR ANDROID) target_link_libraries(bssl ssl crypto) else() - target_link_libraries(bssl ssl crypto -lrt) + find_library(FOUND_LIBRT rt) + if (FOUND_LIBRT) + target_link_libraries(bssl ssl crypto -lrt) + else() + target_link_libraries(bssl ssl crypto) + endif() endif()