MoveSystemFiles.cmake 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # file(RENAME "${CMAKE_INSTALL_PREFIX} "/etc/dbus-1/system.d/fancontrol.gui.helper.conf")
  2. # file(RENAME "${CMAKE_INSTALL_PREFIX}/lib/kauth/fancontrol-gui-helper" "/usr/lib/kauth/fancontrol-gui-helper")
  3. # file(RENAME "${CMAKE_INSTALL_PREFIX}/share/dbus-1/system-services/fancontrol.gui.helper.service" "/usr/share/dbus-1/system-services/fancontrol.gui.helper.service")
  4. set(helper_conf_file "etc/dbus-1/system.d/fancontrol.gui.helper.conf")
  5. set(helper_bin_file "lib/kauth/fancontrol-gui-helper")
  6. set(helper_service_file "share/dbus-1/system-services/fancontrol.gui.helper.service")
  7. set(helper_conf_file_destination "/${helper_conf_file}")
  8. set(helper_bin_file_destination "/usr/${helper_bin_file}")
  9. set(helper_service_file_destination "/usr/${helper_service_file}")
  10. execute_process(COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/${helper_conf_file} ${helper_conf_file_destination} RESULT_VARIABLE result OUTPUT_VARIABLE output)
  11. file(APPEND "${CMAKE_SOURCE_DIR}/install_manifest.txt" "${helper_conf_file_destination}")
  12. message(STATUS "Creating symlink: ${helper_conf_file_destination} -> ${CMAKE_INSTALL_PREFIX}/${helper_conf_file}")
  13. if(${result})
  14. message(WARNING "Creation of symlink ${helper_conf_file_destination} -> ${CMAKE_INSTALL_PREFIX}/${helper_conf_file} ${result} ${output} failed:")
  15. message(WARNING "${output}")
  16. endif(${result})
  17. execute_process(COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/${helper_bin_file} ${helper_bin_file_destination} RESULT_VARIABLE result OUTPUT_VARIABLE output)
  18. file(APPEND "${CMAKE_SOURCE_DIR}/install_manifest.txt" "${helper_bin_file_destination}")
  19. message(STATUS "Creating symlink: ${helper_bin_file_destination} -> ${CMAKE_INSTALL_PREFIX}/${helper_bin_file}")
  20. if(${result})
  21. message(WARNING "Creation of symlink ${helper_bin_file_destination} -> ${CMAKE_INSTALL_PREFIX}/${helper_bin_file} ${result} ${output} failed:")
  22. message(WARNING "${output}")
  23. endif(${result})
  24. execute_process(COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/${helper_service_file} ${helper_service_file_destination} RESULT_VARIABLE result OUTPUT_VARIABLE output)
  25. file(APPEND "${CMAKE_SOURCE_DIR}/install_manifest.txt" "${helper_service_file_destination}")
  26. message(STATUS "Creating symlink: ${helper_service_file_destination} -> ${CMAKE_INSTALL_PREFIX}/${helper_service_file}")
  27. if(${result})
  28. message(WARNING "Creation of symlink ${helper_service_file_destination} -> ${CMAKE_INSTALL_PREFIX}/${helper_service_file} ${result} ${output} failed:")
  29. message(WARNING "${output}")
  30. endif(${result})