From 4ea86ae90ff58a55ea558017f366c68788f48510 Mon Sep 17 00:00:00 2001 From: Christoph Korn Date: Tue, 22 Apr 2014 22:44:23 +0200 Subject: [PATCH] Pass the custom data install path to the compiler The CUSTOM_DATA_INSTALL_PATH constant is checked at different places in the code but was not actually passed to the compiler. This resulted in searching the data files in /usr/games instead of /usr/share/games/megaglest (in Ubuntu and Debian). This commit also fixes setting the variable. It is still wrong for Apple I think. But I can not test it. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77b67e44..7e68cb97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -272,10 +272,11 @@ IF(CMAKE_COMPILER_IS_GNUCXX OR MINGW) IF(APPLE) SET(CUSTOM_DATA_INSTALL_PATH "'\\\\'${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_DATA_INSTALL_PATH}\\\\''" CACHE STRING "The FULL installation path for data files (this is build automatically by combining CMAKE_INSTALL_PREFIX and MEGAGLEST_DATA_INSTALL_PATH)") ELSE() - SET(CUSTOM_DATA_INSTALL_PATH "'\\\"${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_DATA_INSTALL_PATH}\\\"'" CACHE STRING "The FULL installation path for data files (this is build automatically by combining CMAKE_INSTALL_PREFIX and MEGAGLEST_DATA_INSTALL_PATH)") + SET(CUSTOM_DATA_INSTALL_PATH "\"${CMAKE_INSTALL_PREFIX}/${MEGAGLEST_DATA_INSTALL_PATH}\"" CACHE STRING "The FULL installation path for data files (this is build automatically by combining CMAKE_INSTALL_PREFIX and MEGAGLEST_DATA_INSTALL_PATH)") ENDIF() ENDIF() SET(CUSTOM_DATA_INSTALL_PATH_VALUE "-DCUSTOM_DATA_INSTALL_PATH=${CUSTOM_DATA_INSTALL_PATH}") + ADD_DEFINITIONS("-DCUSTOM_DATA_INSTALL_PATH=${CUSTOM_DATA_INSTALL_PATH}") SET(PKG_DATADIR ${CUSTOM_DATA_INSTALL_PATH_VALUE}) SET(PKG_BINDIR ${MEGAGLEST_BIN_INSTALL_PATH})