From b50182326cd157f8d5bc3ace9dc5660aa8244bf6 Mon Sep 17 00:00:00 2001 From: Yaroslav Lelkin Date: Sat, 6 Apr 2024 17:17:44 +0500 Subject: [PATCH] cmake: make sure that OpenGL::EGL is populated bump cmake version cause 3.27 is the version where "... COMPONENTS GLESx" option is introduced. See https://cmake.org/cmake/help/latest/module/FindOpenGL.html --- CMakeLists.txt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71766a8c..8f5682de 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.19) +cmake_minimum_required(VERSION 3.27) include(CheckIncludeFile) # Get version @@ -100,7 +100,14 @@ message(STATUS "Checking deps...") find_package(Threads REQUIRED) find_package(PkgConfig REQUIRED) -find_package(OpenGL REQUIRED) + +if(LEGACY_RENDERER) + set(GLES_VERSION "GLES2") +else() + set(GLES_VERSION "GLES3") +endif() +find_package(OpenGL REQUIRED COMPONENTS ${GLES_VERSION}) + pkg_check_modules(deps REQUIRED IMPORTED_TARGET wayland-server wayland-client wayland-cursor wayland-protocols cairo libdrm xkbcommon libinput pango pangocairo pixman-1 hyprlang>=0.3.2 hyprcursor) # we do not check for wlroots, as we provide it ourselves file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")