MoveSystemFiles.cmake 2.2 KB

1234567891011121314151617181920212223242526272829303132333435
  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. set(install_manifest_path "${CMAKE_SOURCE_DIR}/install_manifest.txt")
  11. execute_process(COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/${helper_conf_file} ${helper_conf_file_destination} RESULT_VARIABLE result OUTPUT_VARIABLE output)
  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. message(STATUS "Creating symlink: ${helper_bin_file_destination} -> ${CMAKE_INSTALL_PREFIX}/${helper_bin_file}")
  19. if(${result})
  20. message(WARNING "Creation of symlink ${helper_bin_file_destination} -> ${CMAKE_INSTALL_PREFIX}/${helper_bin_file} ${result} ${output} failed:")
  21. message(WARNING "${output}")
  22. endif(${result})
  23. execute_process(COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/${helper_service_file} ${helper_service_file_destination} RESULT_VARIABLE result OUTPUT_VARIABLE output)
  24. message(STATUS "Creating symlink: ${helper_service_file_destination} -> ${CMAKE_INSTALL_PREFIX}/${helper_service_file}")
  25. if(${result})
  26. message(WARNING "Creation of symlink ${helper_service_file_destination} -> ${CMAKE_INSTALL_PREFIX}/${helper_service_file} ${result} ${output} failed:")
  27. message(WARNING "${output}")
  28. endif(${result})