diff --git a/tools/FindPythonLibsNew.cmake b/tools/FindPythonLibsNew.cmake index c9b95a9..89c1a53 100644 --- a/tools/FindPythonLibsNew.cmake +++ b/tools/FindPythonLibsNew.cmake @@ -84,7 +84,7 @@ print(s.get_config_var('SO')); print(hasattr(sys, 'gettotalrefcount')+0); print(struct.calcsize('@P')); print(s.get_config_var('LDVERSION') or s.get_config_var('VERSION')); -print(s.get_config_var('LIBDIR') or ''); +print(s.get_config_var('LIBDIR') or s.get_config_var('prefix') or ''); print(s.get_config_var('MULTIARCH') or ''); " RESULT_VARIABLE _PYTHON_SUCCESS @@ -167,12 +167,14 @@ else() else() set(_PYTHON_LIBS_SEARCH "${PYTHON_LIBDIR}") endif() + #message(STATUS "Searching for Python libs in ${_PYTHON_LIBS_SEARCH}") # Probably this needs to be more involved. It would be nice if the config # information the python interpreter itself gave us were more complete. find_library(PYTHON_LIBRARY NAMES "python${PYTHON_LIBRARY_SUFFIX}" PATHS ${_PYTHON_LIBS_SEARCH} + PATH_SUFFIXES libs NO_DEFAULT_PATH) # If all else fails, just set the name/version and let the linker figure out the path.