[Piglit] [PATCH 13/14] cmake: Use find_package to find Waffle

groleo at gmail.com groleo at gmail.com
Fri Nov 16 04:46:58 PST 2012


From: Adrian Marius Negreanu <adrian.m.negreanu at intel.com>

* replace pkg_check_modules with find_package

Signed-off-by: Adrian Marius Negreanu <adrian.m.negreanu at intel.com>
---
 CMakeLists.txt            | 5 ++---
 tests/util/CMakeLists.txt | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8ae8acf..3baf2e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,7 @@ else()
 endif()
 
 if(PIGLIT_USE_WAFFLE)
-	pkg_check_modules(WAFFLE REQUIRED waffle-1>=1.1.0)
+	find_package(Waffle 1.1.0 REQUIRED)
 
 	if(NOT WAFFLE_FOUND)
 		message(FATAL_ERROR "Failed to find Waffle. If Waffle is not "
@@ -42,8 +42,7 @@ if(PIGLIT_USE_WAFFLE)
         endif()
 
         add_definitions(-DPIGLIT_USE_WAFFLE)
-	set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WAFFLE_CFLAGS}")
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WAFFLE_CFLAGS}")
+	include_directories(${WAFFLE_INCLUDE_DIRS})
 else()
 	find_package(GLUT REQUIRED)
 	# The 'REQUIRED' above correctly produces an error for
diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt
index 56c5593..99da592 100644
--- a/tests/util/CMakeLists.txt
+++ b/tests/util/CMakeLists.txt
@@ -53,7 +53,7 @@ endif()
 
 set(UTIL_GL_LIBS
 	piglitutil
-        ${WAFFLE_LDFLAGS}
+	${WAFFLE_LIBRARIES}
 	)
 
 if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
-- 
1.8.0



More information about the Piglit mailing list