72 lines
2.3 KiB
Text
72 lines
2.3 KiB
Text
From FreeBSD
|
|
include same flags for OpenBSD
|
|
|
|
Index: CMakeLists.txt
|
|
--- CMakeLists.txt.orig
|
|
+++ CMakeLists.txt
|
|
@@ -35,7 +35,7 @@ if(X11_FOUND)
|
|
add_definitions(-DPIGLIT_HAS_X11)
|
|
endif()
|
|
|
|
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
|
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
|
set(PIGLIT_BUILD_GLES_TESTS_DEFAULT ON)
|
|
else()
|
|
set(PIGLIT_BUILD_GLES_TESTS_DEFAULT OFF)
|
|
@@ -51,7 +51,7 @@ if(PIGLIT_BUILD_GL_TESTS)
|
|
find_package(OpenGL REQUIRED)
|
|
endif()
|
|
|
|
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
|
option(PIGLIT_USE_WAFFLE "Use Waffle in place of GLUT" ON)
|
|
else()
|
|
option(PIGLIT_USE_WAFFLE "Use Waffle in place of GLUT" OFF)
|
|
@@ -130,7 +130,7 @@ if(PIGLIT_BUILD_CL_TESTS)
|
|
find_package(OpenCL 1.2 REQUIRED)
|
|
endif(PIGLIT_BUILD_CL_TESTS)
|
|
|
|
-IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
+IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
|
if(X11_FOUND AND OPENGL_gl_LIBRARY)
|
|
# Assume the system has GLX. In the future, systems may exist
|
|
# with libGL and libX11 but no GLX, but that world hasn't
|
|
@@ -150,7 +150,7 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
endif()
|
|
endif(GBM_FOUND)
|
|
|
|
- pkg_check_modules(WAYLAND QUIET wayland-client)
|
|
+ #pkg_check_modules(WAYLAND QUIET wayland-client)
|
|
if (WAYLAND_FOUND)
|
|
set(PIGLIT_HAS_WAYLAND True)
|
|
add_definitions(-DPIGLIT_HAS_WAYLAND)
|
|
@@ -169,6 +169,11 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
pkg_check_modules(XCB_DRI2 QUIET xcb-dri2)
|
|
pkg_check_modules(GLPROTO QUIET glproto)
|
|
pkg_check_modules(LIBVULKAN QUIET vulkan)
|
|
+
|
|
+ if (LIBVULKAN_FOUND)
|
|
+ include_directories(${LIBVULKAN_INCLUDE_DIRS})
|
|
+ endif()
|
|
+
|
|
ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
|
if (PIGLIT_USE_WAFFLE)
|
|
set(PIGLIT_HAS_WGL True)
|
|
@@ -380,7 +385,7 @@ endif()
|
|
|
|
check_c_source_compiles(
|
|
"
|
|
- #define _POSIX_C_SOURCE 199309L
|
|
+ #define _POSIX_C_SOURCE 200112L
|
|
#include <time.h>
|
|
int main() { return clock_gettime(CLOCK_MONOTONIC, NULL); }
|
|
"
|
|
@@ -424,7 +429,7 @@ if(HAVE_LIBCACA)
|
|
endif(HAVE_LIBCACA)
|
|
endif(GBM_FOUND)
|
|
|
|
-if(PIGLIT_USE_WAFFLE AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
+if(PIGLIT_USE_WAFFLE AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
|
pkg_check_modules(EGL egl)
|
|
endif()
|
|
|