From 3ec57627ce7c925f4ca7f7f4e6f2e5555c9751c5 Mon Sep 17 00:00:00 2001 From: Zeqiang Li Date: Tue, 22 Mar 2022 17:28:56 +0800 Subject: [PATCH] seperate glesv2 --- sources/Swappy/src/swappy/CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sources/Swappy/src/swappy/CMakeLists.txt b/sources/Swappy/src/swappy/CMakeLists.txt index f616f100..97fe30cc 100644 --- a/sources/Swappy/src/swappy/CMakeLists.txt +++ b/sources/Swappy/src/swappy/CMakeLists.txt @@ -120,10 +120,14 @@ set(SWAPPY_ENABLED TRUE) add_definitions(-DSWAPPY_ENABLED) -target_link_libraries( swappy +set(LIBS + swappy_static + android + log + atomic) - swappy_static - android - GLESv2 - log - atomic) +if(CC_USE_GLES3 OR CC_USE_GLES2) + list(APPEND LIBS GLESv2) +endif() + +target_link_libraries( swappy ${LIBS})