cmake:
[blender.git] / build_files / cmake / Modules / FindPythonLibsUnix.cmake
index 729771f0a529239f2ab3fc5edbf8f1037e6a9440..07d95a53dc2d2bec371f971de57b34416fc8ecb6 100644 (file)
@@ -2,7 +2,7 @@
 #
 #  PYTHON_VERSION
 #  PYTHON_INCLUDE_DIRS
-#  PYTHON_LIBRARY
+#  PYTHON_LIBRARIES
 #  PYTHON_LIBPATH
 #  PYTHON_LINKFLAGS
 #  PYTHON_ROOT_DIR, The base directory to search for Python.
@@ -45,18 +45,18 @@ foreach(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS})
                PATH_SUFFIXES include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}
        )
 
-       find_library(PYTHON_LIBRARY
+       find_library(PYTHON_LIBRARIES
                NAMES "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}"
                HINTS ${_python_SEARCH_DIRS}
                PATH_SUFFIXES lib64 lib
        )
 
-       if((EXISTS ${PYTHON_LIBRARY}) AND (EXISTS ${PYTHON_INCLUDE_DIR}))
+       if((EXISTS ${PYTHON_LIBRARIES}) AND (EXISTS ${PYTHON_INCLUDE_DIR}))
                break()
        else()
                # ensure we dont find values from 2 different ABI versions
                unset(PYTHON_INCLUDE_DIR CACHE)
-               unset(PYTHON_LIBRARY CACHE)
+               unset(PYTHON_LIBRARIES CACHE)
        endif()
 endforeach()
 
@@ -70,19 +70,19 @@ unset(_python_SEARCH_DIRS)
 # all listed variables are TRUE
 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibsUnix  DEFAULT_MSG
-    PYTHON_LIBRARY PYTHON_INCLUDE_DIR)
+    PYTHON_LIBRARIES PYTHON_INCLUDE_DIR)
 
 
 if(PYTHONLIBSUNIX_FOUND)
        # Assign cache items
        set(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR} CACHE STRING "")
-       set(PYTHON_LIBRARY ${PYTHON_LIBRARY} CACHE STRING "")
+       set(PYTHON_LIBRARIES ${PYTHON_LIBRARIES} CACHE STRING "")
        # not used
        # set(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
 
        mark_as_advanced(
                PYTHON_INCLUDE_DIRS
                PYTHON_INCLUDE_DIR
-               PYTHON_LIBRARY
+               PYTHON_LIBRARIES
        )
 endif()