在 Mac OS 上将 Blender 构建为 Python 模块时出现错误 "set_target_properties called with incorrect number of arguments" X
Error "set_target_properties called with incorrect number of arguments" when building Blender as Python module on Mac OS X
我正在尝试将 Blender 作为 Python 模块构建在 Mac OS X El Capitan 上。我正在关注 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 表示当我在 运行 CMake 时,我需要设置:
WITH_PYTHON_INSTALL=OFF
WITH_PLAYER=OFF
WITH_PYTHON_MODULE=ON
当我按上述方式设置这些选项时,出现以下错误:
CMake Error at source/creator/CMakeLists.txt:223 (set_target_properties):
set_target_properties called with incorrect number of arguments.
我试过命令行CMake和CMake GUI,都出现了同样的错误。我对 CMake 一无所知,所以我很迷茫如何解决这个问题。我查看了 source/creator/CMakeLists.txt
的第 223 行,如错误消息所示,它有以下几行。
if(APPLE)
set_target_properties(
blender
PROPERTIES
MACOSX_BUNDLE
LINK_FLAGS_RELEASE "${PLATFORM_LINKFLAGS}"
LINK_FLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG}"
)
endif()
如何解决此错误?
目标属性MACOSX_BUNDLE
确实需要一个参数:
if(APPLE)
set_target_properties(
blender
PROPERTIES
MACOSX_BUNDLE TRUE
LINK_FLAGS_RELEASE "${PLATFORM_LINKFLAGS}"
LINK_FLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG}"
)
endif()
似乎是 source/creator/CMakeLists.txt
中的错误。
我正在尝试将 Blender 作为 Python 模块构建在 Mac OS X El Capitan 上。我正在关注 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 表示当我在 运行 CMake 时,我需要设置:
WITH_PYTHON_INSTALL=OFF
WITH_PLAYER=OFF
WITH_PYTHON_MODULE=ON
当我按上述方式设置这些选项时,出现以下错误:
CMake Error at source/creator/CMakeLists.txt:223 (set_target_properties):
set_target_properties called with incorrect number of arguments.
我试过命令行CMake和CMake GUI,都出现了同样的错误。我对 CMake 一无所知,所以我很迷茫如何解决这个问题。我查看了 source/creator/CMakeLists.txt
的第 223 行,如错误消息所示,它有以下几行。
if(APPLE)
set_target_properties(
blender
PROPERTIES
MACOSX_BUNDLE
LINK_FLAGS_RELEASE "${PLATFORM_LINKFLAGS}"
LINK_FLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG}"
)
endif()
如何解决此错误?
目标属性MACOSX_BUNDLE
确实需要一个参数:
if(APPLE)
set_target_properties(
blender
PROPERTIES
MACOSX_BUNDLE TRUE
LINK_FLAGS_RELEASE "${PLATFORM_LINKFLAGS}"
LINK_FLAGS_DEBUG "${PLATFORM_LINKFLAGS_DEBUG}"
)
endif()
似乎是 source/creator/CMakeLists.txt
中的错误。