Skip to content

Commit

Permalink
Use CMAKE_INSTALL_FULL_* for absolute paths
Browse files Browse the repository at this point in the history
Instead of using a combination of CMAKE_INSTALL_PREFIX and
CMAKE_INSTALL_<dirname>, we should use CMAKE_INSTALL_FULL_<dirname>.

If the CMAKE_INSTALL_<dirname> is an absolute path (e.g. in NixOS), then
prefixing it with another absolute path would be incorrect.
CMAKE_INSTALL_FULL_<dirname> already handles the case if
CMAKE_INSTALL_<dirname> is an absolute path. See:
https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

Signed-off-by: Daniel Fullmer <[email protected]>
  • Loading branch information
danielfullmer authored and madisongh committed Mar 11, 2022
1 parent 61a2ff9 commit c84a48c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config-files/bootcountcheck.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Before=cryptsetup-pre.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_SBINDIR@/bootcountcheck
ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/bootcountcheck

[Install]
WantedBy=sysinit.target
2 changes: 1 addition & 1 deletion config-files/update_bootinfo.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ConditionPathExists=!@CMAKE_INSTALL_SYSCONFDIR@/initrd-release

[Service]
Type=oneshot
ExecStart=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/tegra-bootinfo -b
ExecStart=@CMAKE_INSTALL_FULL_BINDIR@/tegra-bootinfo -b
RemainAfterExit=yes

[Install]
Expand Down
4 changes: 2 additions & 2 deletions tegra-boot-tools.pc.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@

Name: tegra-boot-tools
Version: @PROJECT_VERSION@
Expand Down

0 comments on commit c84a48c

Please sign in to comment.