Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv_contrib
Commits
b5d9ca9b
Commit
b5d9ca9b
authored
Nov 28, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
text: update cmake
parent
afd8a833
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
39 deletions
+33
-39
CMakeLists.txt
modules/text/CMakeLists.txt
+10
-15
FindTesseract.cmake
modules/text/FindTesseract.cmake
+0
-24
FindTesseract.cmake
modules/text/cmake/FindTesseract.cmake
+23
-0
No files found.
modules/text/CMakeLists.txt
View file @
b5d9ca9b
set
(
the_description
"Text Detection and Recognition"
)
ocv_define_module
(
text opencv_ml opencv_
highgui opencv_imgproc opencv_core opencv_features2d
WRAP python
)
ocv_define_module
(
text opencv_ml opencv_
imgproc opencv_core opencv_features2d OPTIONAL opencv_highgui
WRAP python
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
CMAKE_CURRENT_SOURCE_DIR
}
)
find_package
(
Tesseract
)
if
(
Tesseract_FOUND
)
if
(
NOT CMAKE_CROSSCOMPILING OR OPENCV_FIND_TESSERACT
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
find_package
(
Tesseract QUIET
)
if
(
Tesseract_FOUND
)
message
(
STATUS
"Tesseract: YES"
)
set
(
HAVE_TESSERACT 1
)
else
()
ocv_include_directories
(
${
Tesseract_INCLUDE_DIR
}
)
ocv_target_link_libraries
(
${
the_module
}
${
Tesseract_LIBRARIES
}
)
else
()
message
(
STATUS
"Tesseract: NO"
)
endif
()
endif
()
configure_file
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/text_config.hpp.in
${
CMAKE_BINARY_DIR
}
/text_config.hpp @ONLY
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
if
(
${
Tesseract_FOUND
}
)
include_directories
(
${
Tesseract_INCLUDE_DIR
}
)
endif
()
if
(
${
Tesseract_FOUND
}
)
target_link_libraries
(
opencv_text
${
Tesseract_LIBS
}
)
endif
()
ocv_include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
)
modules/text/FindTesseract.cmake
deleted
100644 → 0
View file @
afd8a833
# Tesseract OCR
unset
(
Tesseract_FOUND
)
find_path
(
Tesseract_INCLUDE_DIR tesseract/baseapi.h
HINTS
/usr/include
/usr/local/include
)
find_library
(
Tesseract_LIBRARY NAMES tesseract
HINTS
/usr/lib
/usr/local/lib
)
find_library
(
Lept_LIBRARY NAMES lept
HINTS
/usr/lib
/usr/local/lib
)
set
(
Tesseract_LIBS
${
Tesseract_LIBRARY
}
${
Lept_LIBRARY
}
)
if
(
Tesseract_LIBS AND Tesseract_INCLUDE_DIR
)
set
(
Tesseract_FOUND 1
)
endif
()
modules/text/cmake/FindTesseract.cmake
0 → 100644
View file @
b5d9ca9b
# Tesseract OCR
if
(
COMMAND pkg_check_modules
)
pkg_check_modules
(
Tesseract tesseract lept
)
endif
()
if
(
NOT Tesseract_FOUND
)
find_path
(
Tesseract_INCLUDE_DIR tesseract/baseapi.h
HINTS
/usr/local/include
)
find_library
(
Tesseract_LIBRARY NAMES tesseract
HINTS
/usr/local/lib
)
find_library
(
Lept_LIBRARY NAMES lept
HINTS
/usr/local/lib
)
if
(
Tesseract_INCLUDE_DIR AND Tesseract_LIBRARY AND Lept_LIBRARY
)
set
(
Tesseract_INCLUDE_DIRS
${
Tesseract_INCLUDE_DIR
}
)
set
(
Tesseract_LIBRARIES
${
Tesseract_LIBRARY
}
${
Lept_LIBRARY
}
)
set
(
Tesseract_FOUND 1
)
endif
()
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment