mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-15 00:25:46 -04:00
GLContext: Wayland support
This commit is contained in:
@ -8,6 +8,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeModules/")
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
set(LINUX TRUE)
|
||||
set(SUPPORTS_X11 TRUE)
|
||||
set(SUPPORTS_WAYLAND TRUE)
|
||||
endif()
|
||||
|
||||
|
||||
@ -25,6 +26,9 @@ endif()
|
||||
if(SUPPORTS_X11)
|
||||
option(USE_X11 "Support X11 window system" ON)
|
||||
endif()
|
||||
if(SUPPORTS_WAYLAND)
|
||||
option(USE_WAYLAND "Support Wayland window system" OFF)
|
||||
endif()
|
||||
if(LINUX OR ANDROID)
|
||||
option(USE_EGL "Support EGL OpenGL context creation" ON)
|
||||
endif()
|
||||
@ -95,6 +99,12 @@ endif()
|
||||
if(USE_X11)
|
||||
find_package(X11 REQUIRED)
|
||||
endif()
|
||||
if(USE_WAYLAND)
|
||||
find_package(ECM REQUIRED NO_MODULE)
|
||||
list(APPEND CMAKE_MODULE_PATH "${ECM_MODULE_PATH}")
|
||||
find_package(Wayland REQUIRED Egl)
|
||||
message(STATUS "Wayland support enabled")
|
||||
endif()
|
||||
|
||||
# Set _DEBUG macro for Debug builds.
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
|
||||
|
Reference in New Issue
Block a user