Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMakeList.txt Python find_package() #659

Open
JosuaCarl opened this issue May 9, 2022 · 0 comments
Open

CMakeList.txt Python find_package() #659

JosuaCarl opened this issue May 9, 2022 · 0 comments

Comments

@JosuaCarl
Copy link

JosuaCarl commented May 9, 2022

For cMake version 3.12 or later, variable PythonInterp and PythonLibs has been changed into Python.

find_package(Python ${PY_VERSION} REQUIRED)

should be used, instead of:

find_package(PythonInterp ${PY_VERSION} REQUIRED) find_package(PythonLibs ${PY_VERSION} REQUIRED)

which is still present in the CMakeList.txt file. Otherwise, the presented error is:

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
PYTHON_LIBRARY (ADVANCED)
    linked by target "BALL" in directory /mnt/Data/Programs/BALL-1.4.2

-- Generating done
CMake Generate step failed.  Build files cannot be regenerated correctly.

Changing the line 295 & 297 to the suggested statement fixed the problem (although the second if-statement should not be entered at all, then).

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

No branches or pull requests

1 participant