mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Fix OSX build (#952)
This commit is contained in:
@@ -4,7 +4,10 @@ SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/grabber/xcb)
|
||||
|
||||
find_package(XCB COMPONENTS SHM IMAGE RENDER RANDR REQUIRED)
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(Qt5X11Extras REQUIRED)
|
||||
|
||||
if (NOT APPLE)
|
||||
find_package(Qt5X11Extras REQUIRED)
|
||||
endif()
|
||||
|
||||
include_directories(${XCB_INCLUDE_DIRS})
|
||||
|
||||
@@ -19,3 +22,6 @@ target_link_libraries(xcb-grabber
|
||||
${XCB_LIBRARIES}
|
||||
)
|
||||
|
||||
if (NOT APPLE)
|
||||
target_link_libraries(xcb-grabber Qt5::X11Extras)
|
||||
endif()
|
||||
|
@@ -7,7 +7,10 @@
|
||||
#include <xcb/xcb_event.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
#ifndef __APPLE__
|
||||
#include <QX11Info>
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
|
||||
@@ -427,7 +430,11 @@ xcb_render_pictformat_t XcbGrabber::findFormatForVisual(xcb_visualid_t visual) c
|
||||
if (formats == nullptr)
|
||||
return {};
|
||||
|
||||
#ifdef __APPLE__
|
||||
int screen = 0;
|
||||
#else
|
||||
int screen = QX11Info::appScreen();
|
||||
#endif
|
||||
xcb_render_pictscreen_iterator_t sit =
|
||||
xcb_render_query_pict_formats_screens_iterator(formats.get());
|
||||
|
||||
|
Reference in New Issue
Block a user