diff options
author | Emil Velikov <emil.l.velikov@gmail.com> | 2014-08-10 23:24:54 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2014-12-14 15:53:21 +0000 |
commit | 18caea376dc7158a4e373857e816a64cdc982931 (patch) | |
tree | d858eef19b188f09448f574694156d8e9c188729 /CMakeLists.txt | |
parent | 490b2baa8ac1ba625af4f91b90bf7ef23c2c27d5 (diff) |
utils: add initial WAFFLE_WGL support
This will allow us to use waffle with its upcoming WGL support for
Windows. With that done, the final step to removing glut is to convert
piglit to use waffle for MacOS.
Current implementation does not have input handling/event loop, and as
such one needs to pass "-auto" when running individual tests, otherwise
the test will abort after being displayed for 8 seconds.
Waffle 1.5.0 is the first version that has WGL support.
TODO:
- Add input handling (event_loop).
v2: Updated the instructions in the README.
v3: Update against upstream Waffle (no API breakage)
v4: s/Sleep/fprintf()+getchar()/ in the event_loop. Suggested by Jose.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f1597166..6ba6df880 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ if(PIGLIT_USE_WAFFLE) # validates the required version at most once for the lifetime of the # source tree. If someone changes the required version by editing the # CMakeLists, CMake fails to detect the new requirement. - set(WAFFLE_REQUIRED_VERSION "1.3.0") + set(WAFFLE_REQUIRED_VERSION "1.5.0") if(WAFFLE_VERSION VERSION_LESS WAFFLE_REQUIRED_VERSION) message(FATAL_ERROR "Found waffle-${WAFFLE_VERSION}, but " "piglit requires waffle-${WAFFLE_REQUIRED_VERSION}") @@ -128,6 +128,11 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") pkg_check_modules(LIBDRM_INTEL QUIET libdrm_intel) pkg_check_modules(XCB_DRI2 QUIET xcb-dri2) pkg_check_modules(GLPROTO QUIET glproto) +ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + if (PIGLIT_USE_WAFFLE) + set(PIGLIT_HAS_WGL True) + add_definitions(-DPIGLIT_HAS_WGL) + endif() ENDIF() IF(PIGLIT_HAS_GLX) |