From fbfd95dc63ad03669032cfc011eeb36867ac7ccf Mon Sep 17 00:00:00 2001 From: William Woodall Date: Wed, 1 Aug 2012 20:08:47 -0500 Subject: [PATCH] Added the `rt` library to the `serial_LIBRARIES` variable when on Linux. --- Findserial.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Findserial.cmake b/Findserial.cmake index 20fccd0..f2bc895 100644 --- a/Findserial.cmake +++ b/Findserial.cmake @@ -7,9 +7,13 @@ find_library(serial_LIBRARIES serial /usr/lib /usr/local/lib set(serial_FOUND TRUE) if (NOT serial_INCLUDE_DIRS) - set(serial_FOUND FALSE) + set(serial_FOUND FALSE) endif (NOT serial_INCLUDE_DIRS) if (NOT serial_LIBRARIES) - set(serial_FOUND FALSE) + set(serial_FOUND FALSE) +else (NOT serial_LIBRARIES) + if ("${CMAKE_SYSTEM}" MATCHES "Linux") + list(APPEND serial_LIBRARIES rt) + endif ("${CMAKE_SYSTEM}" MATCHES "Linux") endif (NOT serial_LIBRARIES) \ No newline at end of file