[Piglit] [PATCH 4/4] cmake: Better .
Jose Fonseca
jfonseca at vmware.com
Mon Dec 15 04:19:18 PST 2014
From: José Fonseca <jfonseca at vmware.com>
- Use find_path/find_library so one can see the variables on cmake-gui
- Provide better error message.
---
CMakeLists.txt | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2da7aae..6fb6c8a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,6 +65,17 @@ if(PIGLIT_USE_WAFFLE)
message(FATAL_ERROR "Found waffle-${WAFFLE_VERSION}, but "
"piglit requires waffle-${WAFFLE_REQUIRED_VERSION}")
endif()
+ else ()
+ find_path(WAFFLE_INCLUDE_DIRS waffle.h)
+ 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_LDFLAGS variables accordingly."
+ )
+ endif()
endif ()
add_definitions(-DPIGLIT_USE_WAFFLE)
--
2.1.0
More information about the Piglit
mailing list