Use variable for service install location
After enabling 'usrmerge', the install location for systemd service
files changed. This uses a variable to get the installation location
instead of hardcoding it.
Tested:
Confirmed that with 'usrmerge' enabled, the service file is correctly
installed.
Change-Id: I80eeca283ae4b7f58461b220ab7879ab3a150943
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 983cfe9..913860b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,5 +8,7 @@
add_subdirectory(libpfr)
add_subdirectory(service)
+pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)
+
set(SERVICE_FILES ${PROJECT_SOURCE_DIR}/xyz.openbmc_project.PFR.Manager.service)
-install(FILES ${SERVICE_FILES} DESTINATION /lib/systemd/system/)
+install(FILES ${SERVICE_FILES} DESTINATION "${SYSTEMD_SYSTEM_UNIT_DIR}")