mirror of
https://github.com/Almamu/linux-wallpaperengine.git
synced 2025-09-14 13:56:48 +08:00
Enable wayland support automatically if all libraries are available instead of having an individual switch
Signed-off-by: Alexis Maiquez <almamu@almamu.com>
This commit is contained in:
parent
660f798d9a
commit
af72b8163b
2
.github/workflows/cmake.yml
vendored
2
.github/workflows/cmake.yml
vendored
@ -53,7 +53,7 @@ jobs:
|
|||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
|
||||||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_WAYLAND=True
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
# Build your program with the given configuration
|
# Build your program with the given configuration
|
||||||
|
@ -44,11 +44,10 @@ include_directories(
|
|||||||
${CMAKE_SOURCE_DIR}
|
${CMAKE_SOURCE_DIR}
|
||||||
include)
|
include)
|
||||||
|
|
||||||
if (ENABLE_WAYLAND)
|
# try to enable wayland builds when possible
|
||||||
message(STATUS "Wayland support is enabled!")
|
pkg_check_modules(WAYLAND_SUPPORT wayland-cursor wayland-protocols egl wayland-egl)
|
||||||
|
|
||||||
pkg_check_modules(wayland-cursor wayland-protocols egl wayland-egl)
|
|
||||||
|
|
||||||
|
if(WAYLAND_SUPPORT_FOUND)
|
||||||
find_program(WaylandScanner NAMES wayland-scanner)
|
find_program(WaylandScanner NAMES wayland-scanner)
|
||||||
message(STATUS "Found WaylandScanner at ${WaylandScanner}")
|
message(STATUS "Found WaylandScanner at ${WaylandScanner}")
|
||||||
execute_process(
|
execute_process(
|
||||||
@ -86,8 +85,6 @@ if (ENABLE_WAYLAND)
|
|||||||
"src/WallpaperEngine/Input/Drivers/CWaylandMouseInput.h"
|
"src/WallpaperEngine/Input/Drivers/CWaylandMouseInput.h"
|
||||||
"xdg-shell-protocol.c"
|
"xdg-shell-protocol.c"
|
||||||
"wlr-layer-shell-unstable-v1-protocol.c")
|
"wlr-layer-shell-unstable-v1-protocol.c")
|
||||||
else()
|
|
||||||
set(WAYLAND_SOURCES "")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_executable(
|
add_executable(
|
||||||
@ -341,8 +338,9 @@ target_link_libraries(linux-wallpaperengine
|
|||||||
${PULSEAUDIO_LIBRARY}
|
${PULSEAUDIO_LIBRARY}
|
||||||
glfw)
|
glfw)
|
||||||
|
|
||||||
if (ENABLE_WAYLAND)
|
if (WAYLAND_SUPPORT_FOUND)
|
||||||
target_link_libraries(linux-wallpaperengine pthread
|
target_link_libraries(linux-wallpaperengine
|
||||||
|
pthread
|
||||||
wayland-cursor
|
wayland-cursor
|
||||||
wayland-client
|
wayland-client
|
||||||
wayland-egl
|
wayland-egl
|
||||||
|
Loading…
Reference in New Issue
Block a user