Merge pull request #3179 from Shatur95/fix-cmake-issues

Improve CMake configuration
This commit is contained in:
Egor Pugin 2020-12-13 17:48:22 +03:00 committed by GitHub
commit eac5f88cc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View File

@ -374,11 +374,11 @@ configure_file(
include(CMakePackageConfigHelpers)
configure_package_config_file(
cmake/templates/TesseractConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/TesseractConfig.cmake
INSTALL_DESTINATION lib/tesseract/cmake
${CMAKE_CURRENT_BINARY_DIR}/cmake/tesseract/TesseractConfig.cmake
INSTALL_DESTINATION lib/cmake/tesseract
PATH_VARS INCLUDE_DIR)
write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/cmake/TesseractConfigVersion.cmake
${CMAKE_CURRENT_BINARY_DIR}/cmake/tesseract/TesseractConfigVersion.cmake
VERSION ${PACKAGE_VERSION}
COMPATIBILITY SameMajorVersion)

View File

@ -15,13 +15,14 @@
#
# ===================================================================================
include(${CMAKE_CURRENT_LIST_DIR}/tesseract/TesseractTargets.cmake)
include(CMakeFindDependencyMacro)
find_dependency(Leptonica)
find_package(Leptonica REQUIRED)
include(${CMAKE_CURRENT_LIST_DIR}/TesseractTargets.cmake)
@PACKAGE_INIT@
set_and_check(Tesseract_INCLUDE_DIR "@PACKAGE_INCLUDE_DIR@")
set_and_check(Tesseract_INCLUDE_DIRS "@PACKAGE_INCLUDE_DIR@")
set(Tesseract_LIBRARIES libtesseract)
check_required_components(Tesseract)

1
test

@ -1 +0,0 @@
Subproject commit e27d9566917d7d167636a7d0cd59bcfb2c61c7eb