File tree Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Expand file tree Collapse file tree 3 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -198,13 +198,15 @@ message(STATUS "Found python ${PYTHON_LIBRARIES}")
198198
199199# We install the python module in our 'share' path, not in
200200# the site-wide path as we used to.
201- set (PYTHON_SITE_PATH ${CMAKE_INSTALL_PREFIX} /share/cadabra2/python)
202201if (NOT WIN32 )
203- execute_process (
204- COMMAND ${PYTHON_EXECUTABLE} -c "import site; print (site.getsitepackages()[0]);"
205- OUTPUT_VARIABLE OLD_PYTHON_SITE_PATH
206- OUTPUT_STRIP_TRAILING_WHITESPACE
207- )
202+ set (PYTHON_SITE_PATH share/cadabra2/python)
203+ execute_process (
204+ COMMAND ${PYTHON_EXECUTABLE} -c "import site; print (site.getsitepackages()[0]);"
205+ OUTPUT_VARIABLE OLD_PYTHON_SITE_PATH
206+ OUTPUT_STRIP_TRAILING_WHITESPACE
207+ )
208+ else ()
209+ set (PYTHON_SITE_PATH ${CMAKE_INSTALL_PREFIX} /share/cadabra2/python)
208210endif ()
209211
210212
Original file line number Diff line number Diff line change 11if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" )
22 message (FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" )
3- endif (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" )
3+ endif ()
44
55file (READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files )
66string (REGEX REPLACE "\n " ";" files "${files} " )
@@ -14,8 +14,8 @@ foreach(file ${files})
1414 )
1515 if (NOT "${rm_retval} " STREQUAL 0)
1616 message (FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file} " )
17- endif (NOT " ${rm_retval} " STREQUAL 0 )
18- else (IS_SYMLINK " $ENV{DESTDIR}${file} " OR EXISTS " $ENV{DESTDIR}${file} " )
17+ endif ()
18+ else ()
1919 message (STATUS "File $ENV{DESTDIR}${file} does not exist." )
20- endif (IS_SYMLINK " $ENV{DESTDIR}${file} " OR EXISTS " $ENV{DESTDIR}${file} " )
20+ endif ()
2121endforeach (file)
Original file line number Diff line number Diff line change @@ -147,14 +147,15 @@ if (NOT INSTALL_TARGETS_ONLY)
147147 # message("-- Will copy index.theme from /usr/share/icons/hicolor/index.theme")
148148 # install(CODE "execute_process(COMMAND cp /usr/share/icons/hicolor/index.theme ${ICON_THEME})")
149149 #endif()
150+ set (ICON_PREFIX_WITH_DESTDIR $ENV{DESTDIR}${ICON_PREFIX} )
150151 install (FILES ${CADABRA_IMAGES_DIR} /64x64/cadabra2-gtk.png DESTINATION ${ICON_PREFIX} /share/icons/hicolor/64x64/apps)
151152 install (FILES ${CADABRA_IMAGES_DIR} /128x128/cadabra2-gtk.png DESTINATION ${ICON_PREFIX} /share/icons/hicolor/128x128/apps)
152153 install (FILES ${CADABRA_IMAGES_DIR} /256x256/cadabra2-gtk.png DESTINATION ${ICON_PREFIX} /share/icons/hicolor/256x256/apps)
153154 install (FILES ${CADABRA_IMAGES_DIR} /cadabra2-gtk.svg DESTINATION ${ICON_PREFIX} /share/icons/hicolor/scalable/apps)
154155 install (FILES ${CADABRA_ROOT_DIR} /config/cadabra2-gtk.desktop DESTINATION ${ICON_PREFIX} /share/applications)
155- install (CODE "execute_process(COMMAND touch ${ICON_PREFIX } /share/icons/hicolor/icon-theme.cache)" )
156- install (CODE "execute_process(COMMAND gtk-update-icon-cache-3.0 ${ICON_PREFIX } /share/icons/hicolor)" )
157- install (CODE "execute_process(COMMAND chmod go+r ${ICON_PREFIX } /share/icons/hicolor/icon-theme.cache)" )
156+ install (CODE "execute_process(COMMAND touch ${ICON_PREFIX_WITH_DESTDIR } /share/icons/hicolor/icon-theme.cache)" )
157+ install (CODE "execute_process(COMMAND gtk-update-icon-cache-3.0 {ICON_PREFIX_WITH_DESTDIR }/share/icons/hicolor)" )
158+ install (CODE "execute_process(COMMAND chmod go+r ${ICON_PREFIX_WITH_DESTDIR } /share/icons/hicolor/icon-theme.cache)" )
158159
159160 # Install shared libraries on Windows.
160161 # https://stackoverflow.com/questions/32662215/how-do-you-install-gtk-3-0-on-windows
You can’t perform that action at this time.
0 commit comments