diff --git a/CMakeLists.txt b/CMakeLists.txt index c56f483..8447bb2 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/conanfile.py b/conanfile.py index 272acc0..5a61eb2 100644 --- a/conanfile.py +++ b/conanfile.py @@ -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") @@ -127,7 +126,7 @@ class CompressorRecipe(ConanFile): if self.settings.os != "Emscripten": self.requires("libdatachannel/0.24.0") self.requires("libcurl/8.20.0") - + self.requires("clipper2/2.0.1") self.requires("zstd/1.5.7") self.requires("icu-infinipaint/77.1")