diff --git a/CMakeModules/OsgEarthMacroUtils.cmake b/CMakeModules/OsgEarthMacroUtils.cmake
index 7dd0998..730af85 100644
--- a/CMakeModules/OsgEarthMacroUtils.cmake
+++ b/CMakeModules/OsgEarthMacroUtils.cmake
@@ -92,6 +92,11 @@ ENDMACRO(DETECT_OSG_VERSION)
 
 MACRO(LINK_WITH_VARIABLES TRGTNAME)
     FOREACH(varname ${ARGN})
+        string(REPLACE "_LIBRARY" "_LIBRARIES" lwv_libraries "${varname}")
+        if(DEFINED ${lwv_libraries})
+            TARGET_LINK_LIBRARIES(${TRGTNAME} ${${lwv_libraries}})
+            continue()
+        endif()
         IF(${varname}_DEBUG)
             IF(${varname}_RELEASE)
                 TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}_RELEASE}" debug "${${varname}_DEBUG}")