From f582f05365d73b0ef897d7f411a26912e1b1055d Mon Sep 17 00:00:00 2001 From: Bruno Van de Velde Date: Wed, 15 Nov 2023 14:36:15 +0100 Subject: [PATCH] Don't search for OpenGL when linking statically on Android --- cmake/SFMLConfigDependencies.cmake.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/SFMLConfigDependencies.cmake.in b/cmake/SFMLConfigDependencies.cmake.in index 7a67583e5..0c826d712 100644 --- a/cmake/SFMLConfigDependencies.cmake.in +++ b/cmake/SFMLConfigDependencies.cmake.in @@ -15,6 +15,8 @@ if(SFML_STATIC_LIBRARIES) endif() elseif(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") set(FIND_SFML_OS_FREEBSD 1) + elseif(${CMAKE_SYSTEM_NAME} MATCHES "Android") + set(FIND_SFML_OS_ANDROID 1) elseif(${CMAKE_SYSTEM_NAME} MATCHES "iOS") set(FIND_SFML_OS_IOS 1) elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") @@ -41,7 +43,7 @@ if(SFML_STATIC_LIBRARIES) find_dependency(UDev) endif() - if(NOT FIND_SFML_OS_IOS) + if(NOT FIND_SFML_OS_ANDROID AND NOT FIND_SFML_OS_IOS) if(NOT OpenGL_GL_PREFERENCE) set(OpenGL_GL_PREFERENCE "LEGACY") endif()