diff --git a/src/cmake_config.h.in b/src/cmake_config.h.in index 054cca165..6b999052f 100644 --- a/src/cmake_config.h.in +++ b/src/cmake_config.h.in @@ -4,6 +4,7 @@ #define CMAKE_CONFIG_H #define CMAKE_PROJECT_NAME "@PROJECT_NAME@" +#define SHAREDIR "@SHAREDIR@" #define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@" #define CMAKE_VERSION_STRING "@VERSION_STRING@" #ifdef NDEBUG diff --git a/src/porting.cpp b/src/porting.cpp index 17d71a33e..9e902eeaf 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -259,7 +259,7 @@ void initializePaths() pathRemoveFile(buf, '/'); - path_share = std::string(buf) + "/../share/" + PROJECT_NAME; + path_share = std::string(SHAREDIR); //path_share = std::string(INSTALL_PREFIX) + "/share/" + PROJECT_NAME; if (!fs::PathExists(path_share)) { dstream<<"WARNING: system-wide share not found at \""<