diff options
author | Campbell Barton <campbell@blender.org> | 2022-05-31 11:08:31 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-05-31 11:18:24 +0300 |
commit | e82141b6b4aa14f532da9fae5fb7866b61b496f3 (patch) | |
tree | 83208ea7922039229c20b422e9a742eca63f5f90 /build_files | |
parent | 247ceca6292f92d82cb5ecbfb2b2a2a489b5523a (diff) |
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
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/cmake/Modules/FindPythonLibsUnix.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
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 |