Fixup python module install
INSTALL(FILE) does not handle setting linux-specific attributes in the same way that INSTALL(TARGET) does. This patch is suggested by StefanBruens Fixes https://gitlab.com/kicad/code/kicad/issues/9974
This commit is contained in:
parent
3942e31f21
commit
6fd60c5561
|
@ -21,7 +21,7 @@
|
||||||
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
#
|
#
|
||||||
|
|
||||||
cmake_minimum_required( VERSION 3.12 FATAL_ERROR )
|
cmake_minimum_required( VERSION 3.16 FATAL_ERROR )
|
||||||
|
|
||||||
# Default to CMAKE_BUILD_TYPE = Release unless overridden on command line
|
# Default to CMAKE_BUILD_TYPE = Release unless overridden on command line
|
||||||
# http://www.cmake.org/pipermail/cmake/2008-September/023808.html
|
# http://www.cmake.org/pipermail/cmake/2008-September/023808.html
|
||||||
|
|
|
@ -829,7 +829,13 @@ elseif( APPLE )
|
||||||
add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingPythonDirectoryCreation )
|
add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingPythonDirectoryCreation )
|
||||||
set( PYMOD_EXT "so" )
|
set( PYMOD_EXT "so" )
|
||||||
else() # only linux remains among supported platforms
|
else() # only linux remains among supported platforms
|
||||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/_pcbnew.kiface DESTINATION ${PYTHON_DEST} COMPONENT binary RENAME "_pcbnew.so" )
|
install( TARGETS pcbnew_kiface DESTINATION ${PYTHON_DEST} COMPONENT binary )
|
||||||
|
cmake_policy(SET CMP0087 NEW)
|
||||||
|
install( CODE
|
||||||
|
"file( RENAME
|
||||||
|
\$ENV{DESTDIR}${PYTHON_DEST}/\$<TARGET_FILE_NAME:pcbnew_kiface>
|
||||||
|
\$ENV{DESTDIR}${PYTHON_DEST}/_pcbnew.so
|
||||||
|
)" )
|
||||||
set( PYMOD_EXT "so" )
|
set( PYMOD_EXT "so" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue