diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ffcf669cf..1410c52e01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ # 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 # http://www.cmake.org/pipermail/cmake/2008-September/023808.html diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 82de09f3ff..13b8791ae0 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -829,7 +829,13 @@ elseif( APPLE ) add_dependencies( ScriptingModulesPcbnewSoCopy ScriptingPythonDirectoryCreation ) set( PYMOD_EXT "so" ) 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}/\$ + \$ENV{DESTDIR}${PYTHON_DEST}/_pcbnew.so + )" ) set( PYMOD_EXT "so" ) endif()