Fix X86vmode library detection
authorSylvain Beucler <beuc@beuc.net>
Fri, 9 Mar 2012 19:17:37 +0000 (19:17 +0000)
committerSylvain Beucler <beuc@beuc.net>
Fri, 9 Mar 2012 19:17:37 +0000 (19:17 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1083 7f0cb862-5218-0410-a997-914c9d46530a

CMakeLists.txt

index 95eee54..1636a23 100644 (file)
@@ -102,7 +102,11 @@ if(UNIX)
        ENDIF()
        IF(X11_xf86vmode_FOUND)
                SET(HAVE_X11_EXTENSIONS_XF86VMODE_H TRUE)
-               LIST(APPEND LIBS ${X11_xf86vmode_LIB})
+               # Work-around http://www.cmake.org/Bug/bug_view_page.php?bug_id=6976
+               IF(NOT "${X11_Xxf86vm_LIB}")
+                       SET(X11_Xxf86vm_LIB "Xxf86vm")
+               ENDIF()
+               LIST(APPEND LIBS ${X11_Xxf86vm_LIB})
        ENDIF()
 ENDIF()