From 9531a2a7689fab4920d4008956e299fd01921a26 Mon Sep 17 00:00:00 2001 From: hasufell Date: Tue, 3 Apr 2012 07:00:22 +0200 Subject: [PATCH] fix path_share make path_share look explicitly in SHAREDIR instead of potentially-broken relative path --- src/cmake_config.h.in | 1 + src/porting.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 \""<