Skip to content

Commit

Permalink
cmake: fixes #2337 Android cross-build
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenop committed Apr 24, 2019
1 parent 80e54e4 commit 0fe9290
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Expand Up @@ -143,7 +143,7 @@ endif()
###############################################################################

if(NOT CPPAN_BUILD)
if (NOT Leptonica_DIR AND NOT MSVC)
if (NOT Leptonica_DIR AND NOT MSVC AND COMMAND pkg_check_modules)
find_package(PkgConfig REQUIRED)
pkg_check_modules(Leptonica REQUIRED lept>=${MINIMUM_LEPTONICA_VERSION})
link_directories(${Leptonica_LIBRARY_DIRS})
Expand Down Expand Up @@ -292,7 +292,11 @@ include_directories(src/textord)
include_directories(src/viewer)
include_directories(src/wordrec)
if(CMAKE_EXPORT_COMPILE_COMMANDS)
include_directories(src/training)
include_directories(src/training)
endif()
if(ANDROID_TOOLCHAIN)
include_directories(${ANDROID_TOOLCHAIN}/sysroot/usr/include)
add_compile_definitions(__ANDROID_API_FUTURE__)
endif()

########################################
Expand Down

0 comments on commit 0fe9290

Please sign in to comment.