From 2b1330d68f23b39d69ea509ad872e4c1ac2119d5 Mon Sep 17 00:00:00 2001 From: Alexander Borsuk Date: Tue, 29 Nov 2022 11:15:22 +0100 Subject: [PATCH] [3party] Fixed expat compile errors for Android Signed-off-by: Alexander Borsuk --- CMakeLists.txt | 2 +- cmake/OmimHelpers.cmake | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b88a0a4c73..807bf143ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -297,7 +297,7 @@ set(EXPAT_BUILD_DOCS OFF) set(EXPAT_BUILD_PKGCONFIG OFF) set(EXPAT_ENABLE_INSTALL OFF) set(EXPAT_SHARED_LIBS OFF) -find_package_or_fallback_to_3party("expat" "2.5.0" "3party/expat/expat") +find_package_or_fallback_to_3party(EXPAT 2.5.0 3party/expat/expat) add_subdirectory(3party/agg) add_subdirectory(3party/bsdiff-courgette) diff --git a/cmake/OmimHelpers.cmake b/cmake/OmimHelpers.cmake index fd401ee3de..2e1c7c23e2 100644 --- a/cmake/OmimHelpers.cmake +++ b/cmake/OmimHelpers.cmake @@ -309,13 +309,11 @@ ${include_compiled_header_dir}/${pch_file_name}.${PCH_EXTENSION}" endfunction() -# Macro for finding a system provided library -# that fulfills the required minimum version -# or else including the vendored library -# from a local git subdirectory +# Macro for finding a system provided library that fulfills the required minimum version +# or else including the vendored library from a local git subdirectory. macro(find_package_or_fallback_to_3party PACKAGE_NAME MIN_REQUIRED_VERSION SUBDIRECTORY) find_package(${PACKAGE_NAME} ${MIN_REQUIRED_VERSION} QUIET) - if (NOT ${${PACKAGE_NAME}_FOUND} OR ("${${PACKAGE_NAME}_VERSION}" VERSION_LESS "${MIN_REQUIRED_VERSION}")) + if (NOT ${PACKAGE_NAME}_FOUND OR (${PACKAGE_NAME}_VERSION VERSION_LESS "${MIN_REQUIRED_VERSION}")) message(STATUS "Using ${PACKAGE_NAME} from submodule: ${SUBDIRECTORY}") add_subdirectory(${SUBDIRECTORY} ${ARGN}) else()