On 12/08/14 18:18, Emil Velikov wrote:
[...]
  - Use WAFFLE_LIBRARIES over WAFFLE_LDFLAGS for linking purposes.
[...]

Emil,

This particular change is causing the build to fail when libwaffle-1.so is not on a standard library directory (ie., outside /usr/lib or /usr/local/lib). This happened to me as my build machines don't install waffle on system directories.

I'm not sure what was the driver for replacing WAFFLE_LIBRARIES with WAFFLE_LDFLAGS, but I believe we should undo it.

Jose





Signed-off-by: Emil Velikov <emil.l.veli...@gmail.com>
---
  CMakeLists.txt            | 18 +++++++++---------
  tests/util/CMakeLists.txt | 15 ++++++++++-----
  2 files changed, 19 insertions(+), 14 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39fd0d1..6fc7889 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,14 +37,16 @@ else()
  endif()

  if(PIGLIT_USE_WAFFLE)
-       pkg_check_modules(WAFFLE REQUIRED waffle-1)
+       if (NOT MSVC)
+               pkg_check_modules(WAFFLE REQUIRED waffle-1)

-       if(NOT WAFFLE_FOUND)
-               message(FATAL_ERROR "Failed to find Waffle. If Waffle is not "
-               "packaged for your distribution, you can get it at "
-               
"https://urldefense.proofpoint.com/v1/url?u=http://www.waffle-gl.org/&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0A&m=GCeqo9a0Xc7ai%2FC9u2WCmp0mtSQwRgI3rDzA4WOiAgo%3D%0A&s=72b63e94c236bd9ef6b7fdb1594ca4936bba0d9b805a35096e7dae5782c3b692.";
-       )
-       endif()
+               if(NOT WAFFLE_FOUND)
+                       message(FATAL_ERROR "Failed to find Waffle. If Waffle"
+                       "is not packaged for your distribution, you can get "
+                       "it at 
https://urldefense.proofpoint.com/v1/url?u=http://www.waffle-gl.org/&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0A&m=GCeqo9a0Xc7ai%2FC9u2WCmp0mtSQwRgI3rDzA4WOiAgo%3D%0A&s=72b63e94c236bd9ef6b7fdb1594ca4936bba0d9b805a35096e7dae5782c3b692.";
+               )
+               endif()
+       }

        # Check the installed waffle version.
        #
@@ -62,8 +64,6 @@ if(PIGLIT_USE_WAFFLE)

        add_definitions(-DPIGLIT_USE_WAFFLE)
        add_definitions(-DWAFFLE_API_VERSION=0x0103)
-       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WAFFLE_CFLAGS}")
-       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WAFFLE_CFLAGS}")
  else()
        find_package(GLUT REQUIRED)

diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
index 10c5dbc..35e2215 100644
--- a/tests/util/CMakeLists.txt
+++ b/tests/util/CMakeLists.txt
@@ -25,6 +25,7 @@ set(UTIL_GL_INCLUDES
        ${UTIL_INCLUDES}
        ${GLEXT_INCLUDE_DIR}
        ${OPENGL_INCLUDE_PATH}
+       ${WAFFLE_INCLUDE_DIRS}
        )

  set(UTIL_GL_SOURCES
@@ -47,6 +48,11 @@ set(UTIL_GL_SOURCES
        ${CMAKE_BINARY_DIR}/tests/util/piglit-util-gl-enum-gen.c
        )

+set(UTIL_GL_LIBS
+       piglitutil
+       ${WAFFLE_LDFLAGS}
+       )
+
  if(PIGLIT_USE_WAFFLE)
        list(APPEND UTIL_GL_SOURCES
                piglit-framework-gl/piglit_fbo_framework.c
@@ -75,17 +81,16 @@ if(PIGLIT_USE_WAFFLE)
                        piglit-framework-gl/piglit_x11_framework.c
                )
        endif()
+
+       list(APPEND UTIL_GL_LIBS
+               ${WAFFLE_LIBRARIES}
+       )
  else()
        list(APPEND UTIL_GL_SOURCES
                piglit-framework-gl/piglit_glut_framework.c
        )
  endif()

-set(UTIL_GL_LIBS
-       piglitutil
-       ${WAFFLE_LDFLAGS}
-       )
-
  if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
        # One needs to have at least one hardware driver present, otherwise
        # there is no point compiling just the dispatcher.


_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to