Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
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
Commits
f7315156
Commit
f7315156
authored
6 years ago
by
Alexander Alekhin
Committed by
Maksim Shabunin
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: fix Python detection for standalone bindings
parent
dada5a42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
OpenCVDetectPython.cmake
cmake/OpenCVDetectPython.cmake
+7
-1
standalone.cmake
modules/python/standalone.cmake
+1
-1
No files found.
cmake/OpenCVDetectPython.cmake
View file @
f7315156
...
...
@@ -59,15 +59,21 @@ if(NOT ${found})
if
(
NOT PYTHONINTERP_FOUND
)
message
(
STATUS
"Python is not found:
${
preferred_version
}
EXACT"
)
endif
()
else
(
)
else
if
(
min_version
)
set
(
__python_package_version
"
${
min_version
}
"
)
find_host_package
(
PythonInterp
"
${
min_version
}
"
)
else
()
set
(
__python_package_version
""
)
find_host_package
(
PythonInterp
)
endif
()
string
(
REGEX MATCH
"^[0-9]+"
_python_version_major
"
${
min_version
}
"
)
if
(
PYTHONINTERP_FOUND
)
# Check if python major version is correct
if
(
"
${
_python_version_major
}
"
STREQUAL
" "
)
set
(
_python_version_major
"
${
PYTHON_VERSION_MAJOR
}
"
)
endif
()
if
(
NOT
"
${
_python_version_major
}
"
STREQUAL
"
${
PYTHON_VERSION_MAJOR
}
"
AND NOT DEFINED
${
executable
}
)
...
...
This diff is collapsed.
Click to expand it.
modules/python/standalone.cmake
View file @
f7315156
...
...
@@ -10,7 +10,7 @@ include("${OpenCV_SOURCE_DIR}/cmake/OpenCVUtils.cmake")
set
(
OPENCV_PYTHON_SKIP_DETECTION ON
)
include
(
"
${
OpenCV_SOURCE_DIR
}
/cmake/OpenCVDetectPython.cmake"
)
find_python
(
"
"
"2.7
"
PYTHON_LIBRARY PYTHON_INCLUDE_DIR
find_python
(
"
${
OPENCV_PYTHON_VERSION
}
"
"
${
OPENCV_PYTHON_VERSION
}
"
PYTHON_LIBRARY PYTHON_INCLUDE_DIR
PYTHONINTERP_FOUND PYTHON_EXECUTABLE PYTHON_VERSION_STRING
PYTHON_VERSION_MAJOR PYTHON_VERSION_MINOR PYTHONLIBS_FOUND
PYTHONLIBS_VERSION_STRING PYTHON_LIBRARIES PYTHON_LIBRARY
...
...
This diff is collapsed.
Click to expand it.
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