-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
In your CMakeLists.txt, five absolute path are used as the destination of install command, which is not recommended by CMake.
agent/CMakeLists.txt: 89 and 100
SET(SYS_CONFIG_DIR ${CMAKE_INSTALL_FULL_SYSCONFDIR}/softwarecontainer/)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/softwarecontainer-config" DESTINATION ${SYS_CONFIG_DIR})
install(FILES softwarecontainer-agent.conf DESTINATION "/etc/dbus-1/system.d")
examples/temperature/temperature-service/CMakeLists.txt: 27
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/dbus/com.pelagicore.TemperatureService.conf
DESTINATION /etc/dbus-1/system.d/)
libsoftwarecontainer/CMakeLists.txt: 57 and 59
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/softwarecontainer.pc DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/softwarecontainer.conf DESTINATION ${SYS_CONFIG_DIR})
When attempting to use the --prefix option to relocate the installation destination, using an absolute path causes the installation to fail. This prevents the installation to custom prefixes and could lead to unintended issues.
There are numerous similar fixes, such as this example.
I think the destinatioin should be set to a relative path, excluding ${CMAKE_INSTALL_PREFIX}. For example, using CMAKE_INSTALL_SYSCONFDIR rather than full_dir would be a better practice.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels