Index: src/waffle/CMakeLists.txt
--- src/waffle/CMakeLists.txt.orig
+++ src/waffle/CMakeLists.txt
@@ -123,7 +123,7 @@ if(waffle_on_linux)
         linux/linux_platform.c
         )
     list(APPEND waffle_libdeps
-        dl
+        ${CMAKE_DL_LIBS}
         pthread
         )
 endif()
