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:
authorCampbell Barton <ideasman42@gmail.com>2012-01-11 04:09:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-11 04:09:46 +0400
commit535d27dac28dd051b1c35f55a3726e2231fbc3c2 (patch)
treeafe059dc55fa8389e4142a71a2d621daf7c4d609
parentdbdd09869b942a206ccaa9e6b4dc7b34d104c3fb (diff)
when building blender as a py module use add_library(... MODULE on all systems, was SHARED on linux/windows.
-rw-r--r--build_files/cmake/RpmBuild.cmake4
-rw-r--r--source/creator/CMakeLists.txt41
2 files changed, 18 insertions, 27 deletions
diff --git a/build_files/cmake/RpmBuild.cmake b/build_files/cmake/RpmBuild.cmake
index 2fdd0a72932..f46c41e4d0e 100644
--- a/build_files/cmake/RpmBuild.cmake
+++ b/build_files/cmake/RpmBuild.cmake
@@ -13,7 +13,7 @@ if(NOT DEFINED RPMBUILD)
if(RPMBUILD)
message(STATUS "RPM Build Found: ${RPMBUILD}")
- else(RPMBUILD)
+ else()
message(STATUS "RPM Build Not Found (rpmbuild). RPM generation will not be available")
endif()
@@ -21,6 +21,6 @@ endif()
if(RPMBUILD)
set(RPMBUILD_FOUND TRUE)
-else(RPMBUILD)
+else()
set(RPMBUILD_FOUND FALSE)
endif() \ No newline at end of file
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 180d0123ae6..d8c0a5a4f0d 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -165,36 +165,27 @@ if(WITH_PYTHON_MODULE)
add_definitions(-DWITH_PYTHON_MODULE)
# creates ./bin/bpy.so which can be imported as a python module.
- if(APPLE)
- add_library(blender MODULE ${SRC})
- set_target_properties(
- blender
- PROPERTIES
- PREFIX ""
- OUTPUT_NAME bpy
- LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
- )
+ #
+ # note that 'SHARED' works on Linux and Windows,
+ # but not OSX which _must_ be 'MODULE'
+ add_library(blender MODULE ${SRC})
+ set_target_properties(
+ blender
+ PROPERTIES
+ PREFIX ""
+ OUTPUT_NAME bpy
+ LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
+ RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin # only needed on windows
+ )
- else(APPLE)
- add_library(blender SHARED ${SRC})
+ if(WIN32)
+ # python modules use this
set_target_properties(
blender
PROPERTIES
- PREFIX ""
- OUTPUT_NAME bpy
- LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
- RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin # only needed on windows
+ SUFFIX ".pyd"
)
-
- if(WIN32)
- # python modules use this
- set_target_properties(
- blender
- PROPERTIES
- SUFFIX ".pyd"
- )
- endif()
- endif(APPLE)
+ endif()
else()
add_executable(blender ${EXETYPE} ${SRC})