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: Ia7e3ef57cbbd89cd259472f48baab2ec1b661fd1
Signed-off-by: Jason M. Bills <jason.m.bills@intel.com>
diff --git a/callback-manager/CMakeLists.txt b/callback-manager/CMakeLists.txt
index 2b4e947..3754f03 100644
--- a/callback-manager/CMakeLists.txt
+++ b/callback-manager/CMakeLists.txt
@@ -63,5 +63,8 @@
 
 set (SERVICE_FILES ${PROJECT_SOURCE_DIR}/service_files/callback-manager.service)
 
+find_package (PkgConfig REQUIRED)
+pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)
+
 install (TARGETS callback-manager DESTINATION sbin)
-install (FILES ${SERVICE_FILES} DESTINATION /lib/systemd/system/)
+install (FILES ${SERVICE_FILES} DESTINATION "${SYSTEMD_SYSTEM_UNIT_DIR}")
diff --git a/hsbp-manager/CMakeLists.txt b/hsbp-manager/CMakeLists.txt
index 6b44e9a..db7ec2a 100644
--- a/hsbp-manager/CMakeLists.txt
+++ b/hsbp-manager/CMakeLists.txt
@@ -86,7 +86,11 @@
     add_dependencies (hsbp-manager sdbusplus-project)
 endif ()
 
+
+find_package (PkgConfig REQUIRED)
+pkg_get_variable(SYSTEMD_SYSTEM_UNIT_DIR systemd systemdsystemunitdir)
+
 set (SERVICE_FILES ${PROJECT_SOURCE_DIR}/service_files/hsbp-manager.service)
 
 install (TARGETS hsbp-manager DESTINATION bin)
-install (FILES ${SERVICE_FILES} DESTINATION /lib/systemd/system/)
+install (FILES ${SERVICE_FILES} DESTINATION "${SYSTEMD_SYSTEM_UNIT_DIR}")