I\'m new to CMake and have trouble understanding some usage concepts.
I\'m calling a python script from a c++ program:
#include
...
Py_I
The best way to solve the problem that the wrong version is found (for instance 3.0 instead of 2.7) is to specify the minimum version to find_package (this will choose any version >= 2.7):
FIND_PACKAGE(PythonLibs 2.7 REQUIRED)
or to get the exact version:
FIND_PACKAGE(PythonLibs 2.7.5 EXACT REQUIRED)