Skip to content

Commit

Permalink
Merge pull request #198 from egorpugin/master
Browse files Browse the repository at this point in the history
[ci] Switch to leptonica 1.73. Better leptonica search on *nix systems.
  • Loading branch information
zdenop committed Jan 26, 2016
2 parents 516d58d + b48abd8 commit 1826ac1
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 66 deletions.
14 changes: 8 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,21 @@ before_install:

- if [[ $OSX ]]; then brew update; fi

- export LEPT_VER=1.73

install:
- if [[ $OSX ]]; then brew install icu4c pango; brew link --force gettext; fi
- if [[ $OSX ]]; then export ICU_ROOT=/usr/local/opt/icu4c ; fi
- wget --no-check-certificate https://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.sh
- sudo sh cmake-3.3.1-Linux-x86_64.sh --skip-license --prefix=/usr
- wget -O leptonica.zip https://github.com/egorpugin/leptonica/archive/master.zip
- wget --no-check-certificate https://www.cmake.org/files/v3.4/cmake-3.4.1-Linux-x86_64.sh
- sudo sh cmake-3.4.1-Linux-x86_64.sh --skip-license --prefix=/usr
- wget -O leptonica.zip https://github.com/DanBloomberg/leptonica/archive/v$LEPT_VER.zip
- unzip leptonica.zip -d .
- cmake -Hleptonica-master -Bleptonica-master/build
- make -C leptonica-master/build
- cmake -Hleptonica-$LEPT_VER -Bleptonica-$LEPT_VER/build
- make -C leptonica-$LEPT_VER/build
- if [[ $LINUX && "$CXX" = "g++" ]]; then export CXX="g++-4.8" CC="gcc-4.8"; fi

script:
- mkdir build
- cd build
- cmake .. -DLeptonica_BUILD_DIR=leptonica-master/build
- cmake .. -DLeptonica_DIR=leptonica-$LEPT_VER/build
- make
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ set(VERSION_PLAIN ${VERSION_MAJOR}.${VERSION_MINOR})

set(MINIMUM_LEPTONICA_VERSION 1.71)

if (NOT Leptonica_BUILD_DIR)
find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} REQUIRED)
if (NOT Leptonica_DIR AND NOT MSVC)
find_package(PkgConfig REQUIRED)
pkg_check_modules(Leptonica REQUIRED lept)
else()
set(Leptonica_DIR ${Leptonica_BUILD_DIR})
find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} REQUIRED CONFIG)
endif()

Expand Down
13 changes: 8 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@ platform:
- Win64

configuration:
- Debug
- Release

before_build:
- if %platform%==Win32 set generator=Visual Studio 14
- if %platform%==Win64 set generator=Visual Studio 14 Win64
- if %platform%==Win32 set vcplatform=Win32
- if %platform%==Win64 set vcplatform=x64
- ps: Start-FileDownload 'https://github.com/egorpugin/leptonica/archive/master.zip' -FileName leptonica.zip

- set LEPT_VER=1.73

- ps: Start-FileDownload "https://github.com/DanBloomberg/leptonica/archive/v$env:LEPT_VER.zip" -FileName leptonica.zip
- 7z x leptonica.zip
- cmake -Hleptonica-master -Bleptonica-master/build -G "%generator%"
- msbuild leptonica-master/build/leptonica.sln /p:Platform=%vcplatform% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- cmake -Hleptonica-%LEPT_VER% -Bleptonica-%LEPT_VER%/build -G "%generator%"
- msbuild leptonica-%LEPT_VER%/build/leptonica.sln /p:Platform=%vcplatform% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

build_script:
- mkdir build
- cd build
- cmake .. -G "%generator%" -DLeptonica_BUILD_DIR=leptonica-master/build -DSTATIC=1
- cmake .. -G "%generator%" -DLeptonica_DIR=leptonica-%LEPT_VER%/build -DSTATIC=1
- msbuild tesseract.sln /p:Platform=%vcplatform% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
52 changes: 0 additions & 52 deletions cmake/FindLeptonica.cmake

This file was deleted.

0 comments on commit 1826ac1

Please sign in to comment.