Commit: e82141b6b4aa14f532da9fae5fb7866b61b496f3
Author: Campbell Barton
Date:   Tue May 31 18:08:31 2022 +1000
Branches: master
https://developer.blender.org/rBe82141b6b4aa14f532da9fae5fb7866b61b496f3

Do not provide python libraries for linking if building python module

When building blender as a python module, such as for inclusion in a
wheel, it is not permitted to link against python libraries.
This diff does so by simply unsetting the library when building blender
as a python module, instead of the more heavyweight solution of
switching to the cmake FindPython module.

Reviewed By: LazyDodo, campbellbarton

Ref D15012

===================================================================

M       build_files/cmake/Modules/FindPythonLibsUnix.cmake

===================================================================

diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake 
b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
index 46e8a492972..1e88621303f 100644
--- a/build_files/cmake/Modules/FindPythonLibsUnix.cmake
+++ b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
@@ -175,7 +175,9 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibsUnix  
DEFAULT_MSG
 IF(PYTHONLIBSUNIX_FOUND)
   # Assign cache items
   SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR} ${PYTHON_INCLUDE_CONFIG_DIR})
-  SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
+  IF(NOT WITH_PYTHON_MODULE)
+    SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
+  ENDIF()
 
   FIND_FILE(PYTHON_SITE_PACKAGES
     NAMES

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to