Meta: Silence warnings from optional CMake packages

These can be quite verbose on the command line if the packages aren't
found. As they do not break the build, let's not spam warnings.

The OpenGL package is also now skipped on macOS, where there's no point
in looking for the package anyways.
This commit is contained in:
Timothy Flynn 2023-11-27 22:00:43 -05:00 committed by Tim Flynn
parent 9090290d11
commit 82398e5724
Notes: sideshowbarker 2024-07-17 01:10:58 +09:00
2 changed files with 11 additions and 11 deletions

View file

@ -4,16 +4,16 @@ if (NOT ENABLE_ACCELERATED_GRAPHICS OR EMSCRIPTEN)
return()
endif()
find_package(OpenGL COMPONENTS OpenGL EGL)
if (OPENGL_FOUND)
set(HAS_ACCELERATED_GRAPHICS ON CACHE BOOL "" FORCE)
set(ACCEL_GFX_LIBS OpenGL::OpenGL OpenGL::EGL CACHE STRING "" FORCE)
else()
set(HAS_ACCELERATED_GRAPHICS OFF CACHE BOOL "" FORCE)
endif()
if (APPLE)
set(HAS_ACCELERATED_GRAPHICS ON CACHE BOOL "" FORCE)
set(ACCEL_GFX_LIBS "-framework OpenGL" CACHE STRING "" FORCE)
else()
find_package(OpenGL QUIET COMPONENTS OpenGL EGL)
if (OPENGL_FOUND)
set(HAS_ACCELERATED_GRAPHICS ON CACHE BOOL "" FORCE)
set(ACCEL_GFX_LIBS OpenGL::OpenGL OpenGL::EGL CACHE STRING "" FORCE)
else()
set(HAS_ACCELERATED_GRAPHICS OFF CACHE BOOL "" FORCE)
endif()
endif()

View file

@ -549,8 +549,8 @@ if (BUILD_LAGOM)
add_serenity_subdirectory(Meta/Lagom/Contrib/MacPDF)
endif()
find_package(SDL2)
if(SDL2_FOUND)
find_package(SDL2 QUIET)
if (SDL2_FOUND)
add_serenity_subdirectory(Meta/Lagom/Contrib/VideoPlayerSDL)
endif()