Don't search for OpenGL when linking statically on Android

This commit is contained in:
Bruno Van de Velde 2023-11-15 14:36:15 +01:00 committed by Chris Thrasher
parent 025a9ddc53
commit f582f05365

View File

@ -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()