From f151395fb925f0e0c11048bc1a1faf30d359c537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=B1=E6=9E=97=E5=AD=A4=E9=B9=B0?= <52902574+leamus@users.noreply.github.com> Date: Thu, 15 Feb 2024 11:29:57 +0800 Subject: [PATCH] Update CMakeLists.txt fix some problems when using NDK compiler --- libqnanopainter/CMakeLists.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libqnanopainter/CMakeLists.txt b/libqnanopainter/CMakeLists.txt index c92ff7f..33aace4 100644 --- a/libqnanopainter/CMakeLists.txt +++ b/libqnanopainter/CMakeLists.txt @@ -40,7 +40,7 @@ if(QT_VERSION_MAJOR EQUAL 5) set(IS_QUICK_IN_QT ON) set(IS_WIDGETS_IN_QT ON) # ????? set(QNANO_BUILD_GLES_BACKENDS ON) - set(QNANO_BUILD_GL_BACKENDS ON) + #set(QNANO_BUILD_GL_BACKENDS ON) else() if(QT_FEATURE_quick_canvas) # QT_FEATURE_quick not exists ?? set(IS_QUICK_IN_QT ON) @@ -164,6 +164,15 @@ if(MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS) endif() +if (ANDROID) + find_library(GLESv3_LIBRARY GLESv3) + if (NOT GLESv3_LIBRARY) + set(QNANOPAINTER_QT_LIBS ${QNANOPAINTER_QT_LIBS} GLESv2) + else() + set(QNANOPAINTER_QT_LIBS ${QNANOPAINTER_QT_LIBS} GLESv3) + endif() +endif() + # add QT Libs target_link_libraries(qnanopainter ${QNANOPAINTER_QT_LIBS} )