Fix make package

Fixes:
CPack: Create package using ZIP
CPack: Install projects
CPack: - Run preinstall target for: direwolf
CPack: - Install project: direwolf []
CMake Error at .../build/conf/cmake_install.cmake:54 (file):
  file INSTALL cannot copy file
  ".../conf/99-direwolf-cmedia.rules"
  to "/etc/udev/rules.d/99-direwolf-cmedia.rules": Permission denied.
Call Stack (most recent call first):
  .../build/cmake_install.cmake:74 (include)

CPack Error: Error when generating package: direwolf
make: *** [Makefile:71: package] Errore 1
This commit is contained in:
Daniele Forsi 2023-04-01 11:11:58 +02:00
parent 11468f26f8
commit ade596ec1d
2 changed files with 2 additions and 1 deletions

View File

@ -260,6 +260,7 @@ else()
set(INSTALL_MAN_DIR "share/man/man1") set(INSTALL_MAN_DIR "share/man/man1")
endif() endif()
set(INSTALL_DATA_DIR "share/${PROJECT_NAME}") set(INSTALL_DATA_DIR "share/${PROJECT_NAME}")
set(INSTALL_UDEV_DIR "etc/udev/rules.d/")
endif(WIN32 OR CYGWIN) endif(WIN32 OR CYGWIN)
# requirements # requirements

View File

@ -26,7 +26,7 @@ file(WRITE "${CMAKE_BINARY_DIR}/direwolf.conf" "${file_content}")
# install udev rules for CM108 # install udev rules for CM108
if(LINUX) if(LINUX)
install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /etc/udev/rules.d/) install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION ${INSTALL_UDEV_DIR})
endif() endif()
install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ${INSTALL_CONF_DIR}) install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ${INSTALL_CONF_DIR})