I'm trying to build Blender as a Python module on Mac OS X El Capitan. I'm following this tutorial for building Blender as Python module and this tutorial for building Blender in general. My experience is as follows. I can run CMake without any errors with the default settings. However, I want to build Blender as a Python module, and this page indicates that while I'm running CMake, I need to set:
WITH_PYTHON_INSTALL=OFF
WITH_PLAYER=OFF
WITH_PYTHON_MODULE=ON
When I set these options as above, I get the following error:
CMake Error at source/creator/CMakeLists.txt:223 (set_target_properties):
set_target_properties called with incorrect number of arguments.
I've tried both command line CMake and CMake GUI, with the same error. I know nothing about CMake, so I'm very lost as to how to resolve this. I've looked at line 223 of source/creator/CMakeLists.txt as the error message indicated, and it has the following lines.
if(APPLE)
set_target_properties(
blender
PROPERTIES
MACOSX_BUNDLE
LINK_FLAGS_RELEASE "${PLATFORM_LINKFLAGS}"
LINK_FLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG}"
)
endif()
How do I resolve this error?
MACOSX_BUNDLEproperty is missed. According to the property documentation, its value may be either false-like (e.g. "FALSE") or true-like (e.g. "TRUE"). Unsure which one is intended of the author of this code.