[CMake] about FIND_PACKAGE(PythonLibs): Could NOT find PythonLibs

Richie Hwang flyovermoon at gmail.com
Mon Oct 4 15:23:35 EDT 2010


Hi,

I am using swig to bind python and a c++ project. According to the
example, In my Cmakelist.txt I wrote as follows:

SET(PYTHON_INCLUDE_DIRS "C:\\Python27\\include")
SET(PYTHON_LIBRARIES "C:\\Python27\\libs")
FIND_PACKAGE(PythonLibs)

Still get the errors:

Could NOT find PythonLibs  (missing:  PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS)
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_INCLUDE_DIR (ADVANCED)
   used as include directory in directory D:/test_swig/cmake_swig
PYTHON_LIBRARY (ADVANCED)
    linked by target "_scalar_vector_matrix" in directory
D:/test_swig/cmake_swig

Could you please tell my why I still got this error after setting
PYTHON_INCLUDE_DIRS and PYTHON_LIBRARIES?

Thanks,
Richie


More information about the CMake mailing list