Skip to content

Commit

Permalink
Install to correct site-packages on non-Debian computers
Browse files Browse the repository at this point in the history
Because dist-packages is a Debian thing only.

Contributes to issue CURA-3368.
  • Loading branch information
Ghostkeeper committed Sep 15, 2017
1 parent b39fece commit 6484df3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ if(NOT APPLE AND NOT WIN32)
DESTINATION ${CMAKE_INSTALL_BINDIR}
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
RENAME cura)
install(DIRECTORY cura
if(EXISTS /etc/debian_version)
install(DIRECTORY cura
DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages
FILES_MATCHING PATTERN *.py)
else()
install(DIRECTORY cura
DESTINATION lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages/cura
FILES_MATCHING PATTERN *.py)
endif()
install(FILES ${CMAKE_BINARY_DIR}/CuraVersion.py
DESTINATION lib/python${PYTHON_VERSION_MAJOR}/dist-packages/cura)
install(FILES ${CMAKE_BINARY_DIR}/cura.desktop
Expand Down

0 comments on commit 6484df3

Please sign in to comment.