From e82141b6b4aa14f532da9fae5fb7866b61b496f3 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 31 May 2022 18:08:31 +1000 Subject: 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 --- build_files/cmake/Modules/FindPythonLibsUnix.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build_files/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 -- cgit v1.2.3