Fixed scripts for android build

This commit is contained in:
Yousef Khadadeh 2026-08-26 14:41:38 +03:00
parent 40329d1aba
commit b2839abb06
2 changed files with 15 additions and 11 deletions

View file

@ -233,11 +233,11 @@ else()
find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3-static)
endif()
if((NOT EMSCRIPTEN) AND (NOT APPLE))
if((NOT EMSCRIPTEN) AND (NOT APPLE) AND (NOT ANDROID))
find_package(TBB REQUIRED)
endif()
if((NOT (GRAPHICS_BACKEND STREQUAL "Vulkan")) AND (NOT EMSCRIPTEN) AND LINUX AND (NOT NO_CONAN_BUILD))
if((NOT (GRAPHICS_BACKEND STREQUAL "Vulkan")) AND (NOT EMSCRIPTEN) AND LINUX AND (NOT NO_CONAN_BUILD) AND (NOT ANDROID))
find_package(egl)
endif()
@ -352,7 +352,7 @@ else()
message("Place config in global config folder")
endif()
if(NOT EMSCRIPTEN AND ((GRAPHICS_BACKEND STREQUAL "OpenGL3.3") OR (GRAPHICS_BACKEND STREQUAL "OpenGLES3.0") OR (GRAPHICS_BACKEND STREQUAL "OpenGL2.1")))
if(NOT EMSCRIPTEN AND ((GRAPHICS_BACKEND STREQUAL "OpenGL3.3") OR (GRAPHICS_BACKEND STREQUAL "OpenGLES3.0") OR (GRAPHICS_BACKEND STREQUAL "OpenGL2.1")) AND (NOT ANDROID))
find_package(OpenGL REQUIRED)
if(GRAPHICS_BACKEND STREQUAL "OpenGLES3.0")
target_link_libraries(main OpenGL::GLES3)
@ -428,15 +428,20 @@ if(NOT EMSCRIPTEN)
target_link_libraries(main harfbuzz::harfbuzz)
endif()
if((NOT (GRAPHICS_BACKEND STREQUAL "Vulkan")) AND (NOT EMSCRIPTEN) AND LINUX)
if((NOT (GRAPHICS_BACKEND STREQUAL "Vulkan")) AND (NOT EMSCRIPTEN) AND LINUX AND (NOT ANDROID))
target_link_libraries(main OpenGL::EGL)
endif()
if((NOT (GRAPHICS_BACKEND STREQUAL "Vulkan")) AND (NOT EMSCRIPTEN) AND LINUX AND (NOT NO_CONAN_BUILD))
if((NOT (GRAPHICS_BACKEND STREQUAL "Vulkan")) AND (NOT EMSCRIPTEN) AND LINUX AND (NOT NO_CONAN_BUILD) AND (NOT ANDROID))
target_link_libraries(main egl::egl)
endif()
if(ANDROID)
if(GRAPHICS_BACKEND STREQUAL "OpenGLES3.0")
target_link_libraries(main GLESv3)
else()
message(FATAL_ERROR "Invalid graphics backend for Android. Only OpenGLES3.0 works for now")
endif()
target_link_libraries(main EGL)
endif()

View file

@ -30,7 +30,7 @@ class CompressorRecipe(ConanFile):
"canvaskit_enable_sksl_trace": False,
"canvaskit_enable_webgpu": False,
"canvaskit_enable_webgl": False,
"use_system_libwebp": False, # There's a problem compiling libwebp with emscripten in conan
"use_system_libwebp": False, # There's a problem compiling libwebp with emscripten in conan
"use_conan_libwebp": False
})
elif self.settings.os == "Windows":
@ -48,7 +48,7 @@ class CompressorRecipe(ConanFile):
"use_system_zlib": False,
"enable_svg": True,
"enable_skottie": False,
"enable_bentleyottmann": True, # for some reason, setting this to False results in an error when creating the project
"enable_bentleyottmann": True, # for some reason, setting this to False results in an error when creating the project
"use_vulkan": True
})
else:
@ -84,7 +84,7 @@ class CompressorRecipe(ConanFile):
"use_egl": False,
"enable_svg": True,
"enable_skottie": False,
"enable_bentleyottmann": True # for some reason, setting this to False results in an error when creating the project
"enable_bentleyottmann": True # for some reason, setting this to False results in an error when creating the project
})
else:
self.requires("skia-infinipaint/143.20251028.0", options = {
@ -104,10 +104,9 @@ class CompressorRecipe(ConanFile):
"use_egl": True,
"enable_svg": True,
"enable_skottie": False,
"enable_bentleyottmann": True # for some reason, setting this to False results in an error when creating the project
"enable_bentleyottmann": True # for some reason, setting this to False results in an error when creating the project
})
if self.settings.os == "Linux":
self.requires("fontconfig/2.17.1")
self.requires("egl/system")