I use CMake to build my application. How can I find where the python site-packages directory is located? I need the path in order to compile an extension to python.
I suggest to use get_python_lib(True) if you are making this extension as a dynamic library. This first parameter should be true if you need the platform specific location (in 64bit linux machines, this could be /usr/lib64 instead of /usr/lib)