Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tesseract: fix imported target / system libs / interface definition #4872

Merged

Conversation

SpaceIm
Copy link
Contributor

@SpaceIm SpaceIm commented Mar 13, 2021

Specify library name and version: lib/1.0

  • I've read the guidelines for contributing.
  • I've followed the PEP8 style guides for Python code in the recipes.
  • I've used the latest Conan client version.
  • I've tried at least one configuration locally with the
    conan-center hook activated.

Also, if not already fixed, this new revision closes #4848

official imported target is libtesseract (without namespace)
- don't remove CONFIG from find_package(Leptonica), it's the proper way to find Leptonica, we just need to add cmake_find_package_multi
- leptonica is the official imported target of Leptonica
@SpaceIm
Copy link
Contributor Author

SpaceIm commented Mar 13, 2021

You can deduce official imported target from this line (no NAMESPACE property during export): https://github.com/tesseract-ocr/tesseract/blob/75103040c94ffd7fe5e4e3dfce0a7e67a8420849/CMakeLists.txt#L542
And also the fact that the exported target is libtesseract + EXPORT_NAME property is not explicitly set.

TESS_IMPORTS interface definition if shared:
https://github.com/tesseract-ocr/tesseract/blob/75103040c94ffd7fe5e4e3dfce0a7e67a8420849/CMakeLists.txt#L461-L464

@SpaceIm
Copy link
Contributor Author

SpaceIm commented Mar 13, 2021

with_training=True is probably broken. When True, icu, pango, cairo and fontconfig should be required, USE_SYSTEM_ICU set to True during CMake configuration, and bin folder added into PATH.

Oh yes I see, there is warning about this option. Let's fix it in another PR.

@conan-center-bot
Copy link
Collaborator

All green in build 1 (4f6edcc0cebd7a460254cf3864106691dff39e4f):

  • tesseract/4.1.1@:
    All packages built successfully! (All logs)

for tesseract executable
As from 5.0.0, this imported target should be the official one
@SpaceIm SpaceIm force-pushed the fix/tesseract-imported-target branch from 20facee to ecaf102 Compare March 13, 2021 17:46
@SpaceIm
Copy link
Contributor Author

SpaceIm commented Mar 13, 2021

Tesseract::libtesseract should become the new imported target in 5.0.0. Therefore this recipe provides now both imported targets: libtesseract and Tesseract::libtesseract (instead of only Tesseract::libtesseract before this PR).

@conan-center-bot
Copy link
Collaborator

All green in build 5 (770d232151108426f4fadf48e2967434865c96a0):

  • tesseract/4.1.1@:
    All packages built successfully! (All logs)

@SSE4 SSE4 requested a review from uilianries March 14, 2021 04:03
prince-chrismc referenced this pull request in prince-chrismc/conan-center-index-pending-review Mar 16, 2021
this will allow testing it in a preview wihtout opening an issue
prince-chrismc referenced this pull request in prince-chrismc/conan-center-index-pending-review Mar 16, 2021
prince-chrismc referenced this pull request in prince-chrismc/conan-center-index-pending-review Mar 16, 2021
prince-chrismc referenced this pull request in prince-chrismc/conan-center-index-pending-review Mar 16, 2021
@conan-center-bot conan-center-bot merged commit 080a815 into conan-io:master Mar 16, 2021
@SpaceIm SpaceIm deleted the fix/tesseract-imported-target branch March 16, 2021 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[package] tesseract/4.1.1: not linking with openjpeg
5 participants