linux: Fix standard GNU path usage

The previous attempt at using GNU standard paths
limited searching to the prefix where the loader
was installed.  What we really want though is to
always search in /usr, also search in whatever
local prefix the user installed at if it wasn't
/usr, and use the standard GNU libdir, sysconfdir,
and datadir under those prefixes.  This change
implements that behavior.

Signed-off-by: James Jones <jajones@nvidia.com>
Tested-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 47816fe..442876a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,10 +37,13 @@
 
 if(NOT WIN32)
     include(GNUInstallDirs)
-    add_definitions(-DLIBDIR="${CMAKE_INSTALL_FULL_LIBDIR}")
-    add_definitions(-DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
-    add_definitions(-DDATADIR="${CMAKE_INSTALL_FULL_DATADIR}")
-
+    add_definitions(-DLIBDIR="${CMAKE_INSTALL_LIBDIR}")
+    add_definitions(-DSYSCONFDIR="${CMAKE_INSTALL_SYSCONFDIR}")
+    add_definitions(-DDATADIR="${CMAKE_INSTALL_DATADIR}")
+    if (CMAKE_INSTALL_PREFIX STREQUAL "/usr")
+    else()
+        add_definitions(-DLOCALPREFIX="${CMAKE_INSTALL_PREFIX}")
+    endif()
     if(NOT EXISTS ${LUNARGLASS_PREFIX})
         message(FATAL_ERROR "Necessary LunarGLASS components do not exist: " ${LUNARGLASS_PREFIX})
     endif()