Add librt when necessary
authorTony-LunarG <tony@lunarg.com>
Tue, 26 Feb 2019 21:44:32 +0000 (14:44 -0700)
committerTony Barbour <tony@lunarg.com>
Wed, 27 Feb 2019 23:50:35 +0000 (16:50 -0700)
Change-Id: Ie4b3fdec4d61a52e82880308bb567f2f22c6c273

cube/CMakeLists.txt

index ac39830..451303f 100644 (file)
@@ -174,6 +174,10 @@ elseif(NOT WIN32)
                        cube.vert.inc
                        cube.frag.inc)
         target_link_libraries(vkcube Vulkan::Vulkan)
+        CHECK_LIBRARY_EXISTS("rt" clock_gettime "" NEED_RT)
+        if (NEED_RT)
+            target_link_libraries(vkcube rt)
+        endif()
     endif()
 else()
     if(CMAKE_CL_64)