Fix build of Python plugin for macOS
This commit is contained in:
parent
8cd1df0524
commit
9b876d9d98
|
@ -765,7 +765,7 @@ if( KICAD_SCRIPTING_MODULES )
|
||||||
# put everything into bundle at build time, it is relocated at install
|
# put everything into bundle at build time, it is relocated at install
|
||||||
add_custom_target( ScriptingModulesPcbnewSoCopy ALL
|
add_custom_target( ScriptingModulesPcbnewSoCopy ALL
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
|
COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so" "${PYTHON_DEST}/"
|
||||||
DEPENDS _pcbnew
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.so
|
||||||
COMMENT "Copying _pcbnew.so into ${PYTHON_DEST}"
|
COMMENT "Copying _pcbnew.so into ${PYTHON_DEST}"
|
||||||
)
|
)
|
||||||
add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingWxpythonCopy )
|
add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingWxpythonCopy )
|
||||||
|
@ -776,6 +776,19 @@ if( KICAD_SCRIPTING_MODULES )
|
||||||
set( PYMOD_EXT "so" )
|
set( PYMOD_EXT "so" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if( APPLE )
|
||||||
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
|
||||||
|
DEPENDS pcbnew_kiface
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy ${OSX_BUNDLE_BUILD_KIFACE_DIR}/_pcbnew.kiface _pcbnew.${PYMOD_EXT}
|
||||||
|
COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
|
||||||
|
)
|
||||||
|
add_custom_target(
|
||||||
|
pcbnew_python_module ALL
|
||||||
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
|
||||||
|
|
||||||
# For phase 1, copy _pcbnew.kiface to the python module.
|
# For phase 1, copy _pcbnew.kiface to the python module.
|
||||||
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
|
||||||
DEPENDS pcbnew_kiface
|
DEPENDS pcbnew_kiface
|
||||||
|
@ -786,6 +799,7 @@ if( KICAD_SCRIPTING_MODULES )
|
||||||
pcbnew_python_module ALL
|
pcbnew_python_module ALL
|
||||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue