Apparently find_package() and pkg_check_modules() return different
variables, while piglit still builds on my system without this patch if
fails on many other systems. This problem was doubly masked by the fact
that in the original series there is an additional patch to use waffle's
cmake config file instead of pkg_config. That patch is waiting for the
next cmake release.

cc: Mark Janes <[email protected]>
Signed-off-by: Dylan Baker <[email protected]>
---

 CMakeLists.txt            | 6 +++---
 tests/util/CMakeLists.txt | 7 +++++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b65f990..b7874cf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,13 +67,13 @@ if(PIGLIT_USE_WAFFLE)
                endif()
        else ()
                find_path(Waffle_INCLUDE_DIRS waffle.h)
-        find_library(Waffle_LIBRARIES waffle-1)
-               if(Waffle_INCLUDE_DIRS AND Waffle_LIBRARIES)
+               find_library(Waffle_LDFLAGS waffle-1)
+               if(Waffle_INCLUDE_DIRS AND Waffle_LDFLAGS)
                        set(Waffle_FOUND TRUE)
                else()
                        message(FATAL_ERROR "Failed to find Waffle. Get and 
build Waffle from "
                                "http://www.waffle-gl.org and set 
Waffle_INCLUDE_DIRS and "
-                               "Waffle_LIBRARIES variables accordingly."
+                               "Waffle_LDFLAGS variables accordingly."
                        )
                endif()
        endif ()
diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
index e272dc6..45fd25f 100644
--- a/tests/util/CMakeLists.txt
+++ b/tests/util/CMakeLists.txt
@@ -85,9 +85,12 @@ if(PIGLIT_USE_WAFFLE)
                )
        endif()
 
+       list(APPEND UTIL_GL_LIBS
+               ${Waffle_LDFLAGS}
+       )
        IF(PIGLIT_BUILD_GLX_TESTS)
-        list(APPEND UTIL_GL_LIBS
-            ${Waffle_LIBRARIES} ${OPENGL_gl_LIBRARY}
+               list(APPEND UTIL_GL_LIBS
+                       ${OPENGL_gl_LIBRARY}
                )
        ENDIF(PIGLIT_BUILD_GLX_TESTS)
 else()
-- 
2.2.1

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to