adding the possibility to override STK_INSTALL_DATA_DIR_ABSOLUTE; This was necessary to create a ppa
This commit is contained in:
parent
d6c099b50b
commit
2c7474af02
@ -250,11 +250,15 @@ else()
|
||||
mark_as_advanced(PTHREAD_LIBRARY)
|
||||
|
||||
# Set data dir (absolute or relative to CMAKE_INSTALL_PREFIX)
|
||||
get_filename_component(STK_INSTALL_DATA_DIR_ABSOLUTE ${STK_INSTALL_DATA_DIR} ABSOLUTE)
|
||||
if(${STK_INSTALL_DATA_DIR_ABSOLUTE} STREQUAL ${STK_INSTALL_DATA_DIR})
|
||||
add_definitions(-DSUPERTUXKART_DATADIR=\"${STK_INSTALL_DATA_DIR_ABSOLUTE}\")
|
||||
if(NOT STK_INSTALL_DATA_DIR_ABSOLUTE)
|
||||
get_filename_component(STK_INSTALL_DATA_DIR_ABSOLUTE ${STK_INSTALL_DATA_DIR} ABSOLUTE)
|
||||
if(${STK_INSTALL_DATA_DIR_ABSOLUTE} STREQUAL ${STK_INSTALL_DATA_DIR})
|
||||
add_definitions(-DSUPERTUXKART_DATADIR=\"${STK_INSTALL_DATA_DIR_ABSOLUTE}\")
|
||||
else()
|
||||
add_definitions(-DSUPERTUXKART_DATADIR=\"${CMAKE_INSTALL_PREFIX}/${STK_INSTALL_DATA_DIR}\")
|
||||
endif()
|
||||
else()
|
||||
add_definitions(-DSUPERTUXKART_DATADIR=\"${CMAKE_INSTALL_PREFIX}/${STK_INSTALL_DATA_DIR}\")
|
||||
add_definitions(-DSUPERTUXKART_DATADIR=\"${STK_INSTALL_DATA_DIR_ABSOLUTE}\")
|
||||
endif()
|
||||
|
||||
# Build the final executable
|
||||
|
Loading…
Reference in New Issue
Block a user