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.
This commit is contained in:
parent
0f3d6c084f
commit
4ea86ae90f
|
@ -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})
|
||||
|
|
Loading…
Reference in New Issue