From: Walter Doekes Date: Wed, 13 Apr 2022 19:51:52 +0000 (+0200) Subject: use /usr/lib/x86_64-linux-gnu/netradiant path X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e4403ea26e3e0227d1e985f0283c0826b98a2719;p=xonotic%2Fnetradiant.git use /usr/lib/x86_64-linux-gnu/netradiant path --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d865faf5..187accfe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -119,21 +119,22 @@ set(RADIANT_BASENAME "netradiant" CACHE INTERNAL "...") add_definitions(-DRADIANT_BASENAME="${RADIANT_BASENAME}") set(RADIANT_BIN_DIR ${FINAL_INSTALL_PREFIX} CACHE INTERNAL "...") -set(RADIANT_LIB_DIR ${FINAL_INSTALL_PREFIX}/lib CACHE INTERNAL "...") +set(RADIANT_LIB_DIR ${FINAL_INSTALL_PREFIX}/lib/${CMAKE_LIBRARY_ARCHITECTURE} CACHE INTERNAL "...") set(RADIANT_ADDONS_DIR ${FINAL_INSTALL_PREFIX} CACHE INTERNAL "...") -set(RADIANT_ETC_DIR ${FINAL_INSTALL_PREFIX}/etc CACHE INTERNAL "...") set(RADIANT_SHARE_DIR ${FINAL_INSTALL_PREFIX}/share CACHE INTERNAL "...") set(RADIANT_DATA_DIR ${FINAL_INSTALL_PREFIX} CACHE INTERNAL "...") if (FHS_INSTALL AND NOT BUNDLE_LIBRARIES) set(RADIANT_BIN_DIR ${FINAL_INSTALL_PREFIX}/bin) - set(RADIANT_LIB_DIR ${FINAL_INSTALL_PREFIX}/lib) + set(RADIANT_LIB_DIR ${FINAL_INSTALL_PREFIX}/lib/${CMAKE_LIBRARY_ARCHITECTURE}) set(RADIANT_ADDONS_DIR ${RADIANT_LIB_DIR}/${RADIANT_BASENAME}) - set(RADIANT_ETC_DIR ${FINAL_INSTALL_PREFIX}/etc) set(RADIANT_SHARE_DIR ${FINAL_INSTALL_PREFIX}/share) set(RADIANT_DATA_DIR ${RADIANT_SHARE_DIR}/${RADIANT_BASENAME}) endif () +add_definitions(-DRADIANT_ADDONS_DIR="${RADIANT_ADDONS_DIR}") +add_definitions(-DRADIANT_DATA_DIR="${RADIANT_DATA_DIR}") + set(GAMEPACKS_DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/download CACHE PATH "Where to store downloaded game packs") #----------------------------------------------------------------------- diff --git a/radiant/environment.cpp b/radiant/environment.cpp index f7975518..f9c6c55d 100644 --- a/radiant/environment.cpp +++ b/radiant/environment.cpp @@ -281,7 +281,11 @@ void environment_init( int argc, char const* argv[] ){ { StringOutputStream buffer; +#ifdef RADIANT_ADDONS_DIR + buffer << RADIANT_ADDONS_DIR << "/"; +#else buffer << app_path.c_str() << "../lib/" << RADIANT_BASENAME << "/"; +#endif if ( file_is_directory( buffer.c_str() ) ) { lib_path = buffer.c_str(); } @@ -292,7 +296,11 @@ void environment_init( int argc, char const* argv[] ){ { StringOutputStream buffer; +#ifdef RADIANT_DATA_DIR + buffer << RADIANT_DATA_DIR << "/"; +#else buffer << app_path.c_str() << "../share/" << RADIANT_BASENAME << "/"; +#endif if ( file_is_directory( buffer.c_str() ) ) { data_path = buffer.c_str(); }