Create the symlink for the python module in the build tree as well
The unit tests need the python module to be loadable, so there needs to also be a symlink to the kiface inside the build directory.
This commit is contained in:
parent
9bb5beb264
commit
44a8f1e6e6
|
@ -849,10 +849,6 @@ if( APPLE )
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${OSX_BUNDLE_BUILD_KIFACE_DIR}/_pcbnew.kiface _pcbnew.${PYMOD_EXT}
|
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."
|
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}
|
|
||||||
)
|
|
||||||
elseif( WIN32 )
|
elseif( WIN32 )
|
||||||
# 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}
|
||||||
|
@ -860,12 +856,22 @@ elseif( WIN32 )
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy _pcbnew${KIFACE_SUFFIX} _pcbnew.${PYMOD_EXT}
|
COMMAND ${CMAKE_COMMAND} -E copy _pcbnew${KIFACE_SUFFIX} _pcbnew.${PYMOD_EXT}
|
||||||
COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
|
COMMENT "Creating python's pcbnew native module _pcbnew.${PYMOD_EXT} for command line use."
|
||||||
)
|
)
|
||||||
add_custom_target(
|
else()
|
||||||
pcbnew_python_module ALL
|
# For linux, just create a symlink in the build directory to ensure the unit tests can find the library
|
||||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
|
# We don't actually do anything with this symlink though, since the install process will create the proper
|
||||||
|
# one for the install tree.
|
||||||
|
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
|
||||||
|
DEPENDS pcbnew_kiface
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E create_symlink _pcbnew${KIFACE_SUFFIX} _pcbnew.${PYMOD_EXT}
|
||||||
|
COMMENT "Symlinking _pcbnew.${PYMOD_EXT} to _pcbnew${KIFACE_SUFFIX}."
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_custom_target(
|
||||||
|
pcbnew_python_module ALL
|
||||||
|
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.${PYMOD_EXT}
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if( APPLE )
|
if( APPLE )
|
||||||
# If we don't have wxPython, then we must create the site-packages directory
|
# If we don't have wxPython, then we must create the site-packages directory
|
||||||
|
|
Loading…
Reference in New Issue