Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Fix cmake #39

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

Fix cmake #39

wants to merge 7 commits into from

Conversation

sfraczek
Copy link
Collaborator

@sfraczek sfraczek commented Dec 10, 2019

Bumping cmake version to 3.13.3 allows usage of find_package(Python COMPONENTS Interpreter Development NumPy) which is superior to previous methods. Eliminates need for additional FindNumpy module and solves problem of python version 2/3 mismatch.
It should work theoretically, but it finds python2.6 over 3.4 on my docker so I don't have successful proof.

Sources: https://cmake.org/cmake/help/v3.13/module/FindPython.html

CMakeLists.txt Outdated
if (${CMAKE_VERSION} VERSION_LESS "3.13.3")
find_package(PythonInterp)
set(Python_Interpreter_FOUND ${PYTHONINTERP_FOUND})
set(Python_EXECUTABLE ${Python_EXECUTABLE})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assignment is not required in this case or you mean PYTHON_EXECUTABLE

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it was supposed to be all uppercase.

CMakeLists.txt Outdated

if (PYTHON_PLUGIN)
if (NOT ${PYTHON_VERISON_MAJOR} EQUAL ${OpenCV_VERSION_MAJOR})
message(WARNING "Python version " ${PYTHON_VERSION_MAJOR} " incompatible with OpenCV version " ${OpenCV_VERSION_MAJOR})
if (${Python_VERISON_MAJOR} LESS ${OpenCV_VERSION_MAJOR})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in Python_VERISON_MAJOR, should be Python_VERSION_MAJOR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sfraczek
Copy link
Collaborator Author

sfraczek commented Jan 13, 2020

If we drop python2 we can also remove future from requirements
we have to continue support of python2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants