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
fa4ef14c
Commit
fa4ef14c
authored
Apr 15, 2019
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: use ocv_check_modules()
parent
f6d0e94e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
21 deletions
+24
-21
CMakeLists.txt
modules/freetype/CMakeLists.txt
+14
-15
CMakeLists.txt
modules/text/CMakeLists.txt
+9
-3
FindTesseract.cmake
modules/text/cmake/FindTesseract.cmake
+1
-3
No files found.
modules/freetype/CMakeLists.txt
View file @
fa4ef14c
...
...
@@ -3,25 +3,24 @@ if(APPLE_FRAMEWORK)
ocv_module_disable
(
freetype
)
endif
()
if
(
PKG_CONFIG_FOUND
)
pkg_search_module
(
FREETYPE freetype2
)
pkg_search_module
(
HARFBUZZ harfbuzz
)
endif
()
ocv_check_modules
(
FREETYPE freetype2
)
ocv_check_modules
(
HARFBUZZ harfbuzz
)
if
(
NOT FREETYPE_FOUND
)
message
(
STATUS
"freetype2: NO"
)
else
()
message
(
STATUS
"freetype2: YES"
)
endif
()
if
(
OPENCV_INITIAL_PASS
)
if
(
NOT FREETYPE_FOUND
)
message
(
STATUS
"freetype2: NO"
)
else
()
message
(
STATUS
"freetype2: YES (ver
${
FREETYPE_VERSION
}
)"
)
endif
()
if
(
NOT HARFBUZZ_FOUND
)
message
(
STATUS
"harfbuzz: NO"
)
else
()
message
(
STATUS
"harfbuzz: YES"
)
if
(
NOT HARFBUZZ_FOUND
)
message
(
STATUS
"harfbuzz: NO"
)
else
()
message
(
STATUS
"harfbuzz: YES (ver
${
HARFBUZZ_VERSION
}
)"
)
endif
()
endif
()
if
(
FREETYPE_FOUND AND HARFBUZZ_FOUND
)
if
(
FREETYPE_FOUND AND HARFBUZZ_FOUND
)
ocv_define_module
(
freetype opencv_core opencv_imgproc WRAP python
)
ocv_target_link_libraries
(
${
the_module
}
${
FREETYPE_LIBRARIES
}
${
HARFBUZZ_LIBRARIES
}
)
ocv_include_directories
(
${
FREETYPE_INCLUDE_DIRS
}
${
HARFBUZZ_INCLUDE_DIRS
}
)
...
...
modules/text/CMakeLists.txt
View file @
fa4ef14c
...
...
@@ -2,10 +2,16 @@ set(the_description "Text Detection and Recognition")
ocv_define_module
(
text opencv_ml opencv_imgproc opencv_core opencv_features2d opencv_dnn OPTIONAL opencv_highgui WRAP python java
)
if
(
NOT CMAKE_CROSSCOMPILING OR OPENCV_FIND_TESSERACT
)
set
(
CMAKE_MODULE_PATH
${
CMAKE_MODULE_PATH
}
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake
)
find_package
(
Tesseract QUIET
)
find_package
(
Tesseract QUIET
)
# Prefer CMake's standard locations (including Tesseract_DIR)
if
(
NOT Tesseract_FOUND
)
include
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/FindTesseract.cmake"
)
# OpenCV's fallback
endif
()
if
(
Tesseract_FOUND
)
message
(
STATUS
"Tesseract: YES"
)
if
(
Tesseract_VERSION
)
message
(
STATUS
"Tesseract: YES (ver
${
Tesseract_VERSION
}
)"
)
else
()
message
(
STATUS
"Tesseract: YES (ver unknown)"
)
endif
()
set
(
HAVE_TESSERACT 1
)
ocv_include_directories
(
${
Tesseract_INCLUDE_DIRS
}
)
ocv_target_link_libraries
(
${
the_module
}
${
Tesseract_LIBRARIES
}
)
...
...
modules/text/cmake/FindTesseract.cmake
View file @
fa4ef14c
# Tesseract OCR
if
(
COMMAND pkg_check_modules
)
pkg_check_modules
(
Tesseract tesseract lept
)
endif
()
ocv_check_modules
(
Tesseract tesseract
)
# lept is excluded (not a direct dependency)
if
(
NOT Tesseract_FOUND
)
find_path
(
Tesseract_INCLUDE_DIR tesseract/baseapi.h
HINTS
...
...
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