Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-08-17 17:51:05 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-08-17 17:51:05 +0300
commitf420ef6e61b0ae7f894e1e96a0506482e95c8a3e (patch)
tree9ed0aaba40b655a99cc6d092a29f530b2fe005cc /source/creator/CMakeLists.txt
parent4bc212c115627dba604e71167a7269c2dad75563 (diff)
Fix Python module build for Linux/macOS
However this puts a lib/ folder directly in site-packages which is not great. There is already a 3.4 folder there which really is wrong as well. A proper solution would be to move everything into a bpy/ folder instead of having a bpy.so at the top level.
Diffstat (limited to 'source/creator/CMakeLists.txt')
-rw-r--r--source/creator/CMakeLists.txt28
1 files changed, 17 insertions, 11 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index fd40d0d22b8..7f00e9cd9aa 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -304,8 +304,10 @@ set(BLENDER_TEXT_FILES
if(UNIX AND NOT APPLE)
if(WITH_PYTHON_MODULE)
if(WITH_INSTALL_PORTABLE)
+ set(BPY_INSTALL_DIR ".")
set(TARGETDIR_VER ${BLENDER_VERSION})
else()
+ set(BPY_INSTALL_DIR ${PYTHON_SITE_PACKAGES})
set(TARGETDIR_VER ${PYTHON_SITE_PACKAGES}/${BLENDER_VERSION})
endif()
else()
@@ -339,7 +341,6 @@ elseif(APPLE)
endif()
# License, copyright, readme files.
set(BLENDER_TEXT_FILES_DESTINATION "${TARGETDIR_VER}/../text")
- set(MAC_BLENDER_TARGET_DYLIBS_DIR "${TARGETDIR_VER}/lib")
# Skip relinking on cpack / install
set_target_properties(blender PROPERTIES BUILD_WITH_INSTALL_RPATH true)
endif()
@@ -505,14 +506,22 @@ if(UNIX AND NOT APPLE)
if(WITH_INSTALL_PORTABLE)
install(
TARGETS blender
- DESTINATION "."
+ DESTINATION ${BPY_INSTALL_DIR}
)
else()
install(
TARGETS blender
- LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}
+ LIBRARY DESTINATION ${BPY_INSTALL_DIR}
+ )
+ endif()
+
+ if(PLATFORM_BUNDLED_LIBRARIES)
+ install(
+ FILES ${PLATFORM_BUNDLED_LIBRARIES}
+ DESTINATION ${BPY_INSTALL_DIR}/lib
)
endif()
+
# none of the other files are needed currently
elseif(WITH_INSTALL_PORTABLE)
install(
@@ -552,7 +561,10 @@ if(UNIX AND NOT APPLE)
endif()
if(PLATFORM_BUNDLED_LIBRARIES)
- install(FILES ${PLATFORM_BUNDLED_LIBRARIES} DESTINATION "lib")
+ install(
+ FILES ${PLATFORM_BUNDLED_LIBRARIES}
+ DESTINATION lib
+ )
endif()
set(BLENDER_TEXT_FILES_DESTINATION ".")
@@ -1177,13 +1189,7 @@ elseif(APPLE)
if(PLATFORM_BUNDLED_LIBRARIES)
install(
FILES ${PLATFORM_BUNDLED_LIBRARIES}
- DESTINATION ${MAC_BLENDER_TARGET_DYLIBS_DIR})
- endif()
-
- if(WITH_COMPILER_ASAN)
- install(
- FILES "${COMPILER_ASAN_LIBRARY}"
- DESTINATION "${MAC_BLENDER_TARGET_DYLIBS_DIR}"
+ DESTINATION ${TARGETDIR_VER}/lib
)
endif()