Executable dependency list fixes.
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 2bdd95e..76135a9 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -3,8 +3,9 @@
 
 if (BUILD_SHARED_LIBS)
     add_definitions(-DGLFW_DLL)
+    link_libraries(${OPENGL_gl_LIBRARY})
 else()
-    link_libraries(${GLFW_LIBRARIES})
+    link_libraries(${glfw_LIBRARIES})
 endif()
 
 include_directories(${GLFW_SOURCE_DIR}/include
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index f6749e5..d016fb0 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -3,8 +3,9 @@
 
 if (BUILD_SHARED_LIBS)
     add_definitions(-DGLFW_DLL)
+    link_libraries(${OPENGL_gl_LIBRARY})
 else()
-    link_libraries(${GLFW_LIBRARIES})
+    link_libraries(${glfw_LIBRARIES})
 endif()
 
 include_directories(${GLFW_SOURCE_DIR}/include