Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
c76791c4
Commit
c76791c4
authored
8 years ago
by
Rashad Kanavath
Browse files
Options
Downloads
Patches
Plain Diff
manits:1236 windows issues with opencv config files
parent
39cda889
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMake/FindOpenCV.cmake
+63
-0
63 additions, 0 deletions
CMake/FindOpenCV.cmake
Modules/ThirdParty/OpenCV/CMakeLists.txt
+2
-2
2 additions, 2 deletions
Modules/ThirdParty/OpenCV/CMakeLists.txt
with
65 additions
and
2 deletions
CMake/FindOpenCV.cmake
0 → 100755
+
63
−
0
View file @
c76791c4
find_path
(
cv_INCLUDE_DIR
opencv/cv.h
DOC
"The directory where opencv/cv.h is installed"
)
find_path
(
opencv2_INCLUDE_DIR
opencv2/opencv.hpp
DOC
"The directory where opencv2/opencv.hpp is installed"
)
set
(
opencv_core_NAMES opencv_core
)
set
(
opencv_ml_NAMES opencv_ml
)
if
(
cv_INCLUDE_DIR AND opencv2_INCLUDE_DIR
)
set
(
OPENCV_INCLUDE_DIRS
"
${
cv_INCLUDE_DIR
}
;
${
opencv2_INCLUDE_DIR
}
"
)
list
(
REMOVE_DUPLICATES OPENCV_INCLUDE_DIRS
)
if
(
NOT OpenCV_VERSION
)
file
(
READ
"
${
opencv2_INCLUDE_DIR
}
/opencv2/core/version.hpp"
_header_content
)
string
(
REGEX REPLACE
".*# *define +CV_VERSION_EPOCH +([0-9]+).*"
"
\\
1"
OpenCV_VERSION_MAJOR
${
_header_content
}
)
string
(
REGEX REPLACE
".*# *define +CV_VERSION_MAJOR +([0-9]+).*"
"
\\
1"
OpenCV_VERSION_MINOR
${
_header_content
}
)
string
(
REGEX REPLACE
".*# *define +CV_VERSION_MINOR +([0-9]+).*"
"
\\
1"
OpenCV_VERSION_PATCH
${
_header_content
}
)
string
(
REGEX REPLACE
".*# *define +CV_VERSION_REVISION +([0-9]+).*"
"
\\
1"
OpenCV_VERSION_TWEAK
${
_header_content
}
)
set
(
OpenCV_VERSION
"
${
OpenCV_VERSION_MAJOR
}
.
${
OpenCV_VERSION_MINOR
}
.
${
OpenCV_VERSION_PATCH
}
"
)
endif
()
if
(
WIN32
)
list
(
APPEND opencv_core_NAMES
"opencv_core
${
OpenCV_VERSION_MAJOR
}${
OpenCV_VERSION_MINOR
}${
OpenCV_VERSION_PATCH
}
"
)
list
(
APPEND opencv_ml_NAMES
"opencv_ml
${
OpenCV_VERSION_MAJOR
}${
OpenCV_VERSION_MINOR
}${
OpenCV_VERSION_PATCH
}
"
)
endif
()
endif
()
# Prefer the static library.
find_library
(
OPENCV_core_LIBRARY
NAMES
${
opencv_core_NAMES
}
DOC
"Path to opencv_core library"
)
find_library
(
OPENCV_ml_LIBRARY
NAMES
${
opencv_ml_NAMES
}
DOC
"Path to opencv_ml library"
)
set
(
OpenCV_FOUND FALSE
)
if
(
OPENCV_core_LIBRARY AND OPENCV_ml_LIBRARY
)
set
(
OPENCV_LIBRARIES
"
${
OPENCV_core_LIBRARY
}
;
${
OPENCV_ml_LIBRARY
}
"
)
endif
()
if
(
OPENCV_INCLUDE_DIRS AND OPENCV_LIBRARIES
)
set
(
OpenCV_FOUND TRUE
)
endif
()
include
(
${
CMAKE_ROOT
}
/Modules/FindPackageHandleStandardArgs.cmake
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
OPENCV
REQUIRED_VARS OPENCV_core_LIBRARY OPENCV_INCLUDE_DIRS
VERSION_VAR OpenCV_VERSION
)
This diff is collapsed.
Click to expand it.
Modules/ThirdParty/OpenCV/CMakeLists.txt
+
2
−
2
View file @
c76791c4
project
(
OTBOpenCV
)
set
(
OTBOpenCV_SYSTEM_INCLUDE_DIRS
${
OpenCV_INCLUDE_DIRS
}
)
set
(
OTBOpenCV_LIBRARIES
"
${
O
pen
CV_LIBS
}
"
)
set
(
OTBOpenCV_EXPORT_CODE_BUILD
"find_package(OpenCV REQUIRED
HINTS
${
OpenCV_DIR
}
)"
)
set
(
OTBOpenCV_LIBRARIES
"
${
O
PEN
CV_LIB
RARIE
S
}
"
)
set
(
OTBOpenCV_EXPORT_CODE_BUILD
"find_package(OpenCV REQUIRED)"
)
set
(
OTBOpenCV_EXPORT_CODE_INSTALL
${
OTBOpenCV_EXPORT_CODE_BUILD
}
)
otb_module_impl
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment