linux: Use standard GNU install paths
These should get inherited from the build environment, which should
handle the variation between /usr/lib/$triple on debian vs /usr/lib{,64}
on redhat.
Signed-off-by: Adam Jackson <ajax@redhat.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5c63c6..47816fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,6 +36,11 @@
endif()
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}")
+
if(NOT EXISTS ${LUNARGLASS_PREFIX})
message(FATAL_ERROR "Necessary LunarGLASS components do not exist: " ${LUNARGLASS_PREFIX})
endif()