Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
blender
monado
Commits
23f8991f
Commit
23f8991f
authored
Dec 06, 2020
by
Jakob Bornecrantz
Browse files
cmake: Make sure we have XRANDR if we have XLIB
parent
b85a44a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
23f8991f
...
...
@@ -84,6 +84,8 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
find_package
(
udev REQUIRED
)
set
(
XRT_HAVE_V4L2 TRUE
)
if
(
PKGCONFIG_FOUND
)
pkg_check_modules
(
XRANDR xrandr
)
pkg_check_modules
(
XCB xcb xcb-randr x11-xcb
)
pkg_search_module
(
WAYLAND wayland-client
)
...
...
@@ -116,6 +118,7 @@ option(BUILD_TESTING "Enable building of the test suite?" ON)
cmake_dependent_option
(
CMAKE_INTERPROCEDURAL_OPTIMIZATION
"Enable inter-procedural (link-time) optimization"
OFF
"HAS_IPO"
OFF
)
cmake_dependent_option
(
XRT_HAVE_WAYLAND
"Enable Wayland support"
ON
"WAYLAND_FOUND AND WAYLAND_SCANNER_FOUND AND WAYLAND_PROTOCOLS_FOUND"
OFF
)
cmake_dependent_option
(
XRT_HAVE_XLIB
"Enable xlib support"
ON
"X11_FOUND"
OFF
)
cmake_dependent_option
(
XRT_HAVE_XRANDR
"Enable xlib-xrandr support"
ON
"XRANDR_FOUND"
OFF
)
cmake_dependent_option
(
XRT_HAVE_XCB
"Enable xcb support"
ON
"XCB_FOUND"
OFF
)
cmake_dependent_option
(
XRT_HAVE_VULKAN
"Enable Vulkan Graphics API support (also needed for compositor)"
ON
"VULKAN_FOUND"
OFF
)
...
...
@@ -207,6 +210,10 @@ endif()
# Flags
###
if
(
XRT_HAVE_XLIB AND NOT XRT_HAVE_XRANDR
)
message
(
FATAL_ERROR
"XRT_HAVE_XLIB requires XRT_HAVE_XRANDR but XRT_HAVE_XRANDR is disabled"
)
endif
()
if
(
XRT_HAVE_OPENGLES AND NOT XRT_HAVE_EGL
)
message
(
FATAL_ERROR
"XRT_HAVE_OPENGLES requires XRT_HAVE_EGL but XRT_HAVE_EGL is disabled"
)
endif
()
...
...
@@ -225,7 +232,7 @@ endif()
if
(
XRT_HAVE_XCB
)
set
(
VK_USE_PLATFORM_XCB_KHR TRUE
)
endif
()
if
(
XRT_HAVE_XCB AND XRT_HAVE_XLIB
)
if
(
XRT_HAVE_XCB AND XRT_HAVE_XLIB
AND XRT_HAVE_XRANDR
)
set
(
VK_USE_PLATFORM_XLIB_XRANDR_EXT TRUE
)
endif
()
if
(
XRT_HAVE_WAYLAND
)
...
...
@@ -274,6 +281,7 @@ message(STATUS "# GIT_DESC: ${GIT_DESC}")
message
(
STATUS
"#"
)
message
(
STATUS
"# WAYLAND:
${
XRT_HAVE_WAYLAND
}
"
)
message
(
STATUS
"# XLIB:
${
XRT_HAVE_XLIB
}
"
)
message
(
STATUS
"# XRANDR:
${
XRT_HAVE_XRANDR
}
"
)
message
(
STATUS
"# XCB:
${
XRT_HAVE_XCB
}
"
)
message
(
STATUS
"# OPENGL:
${
XRT_HAVE_OPENGL
}
"
)
message
(
STATUS
"# OPENGLES:
${
XRT_HAVE_OPENGLES
}
"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment