diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/CMakeLists.txt | 3 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemX11.cpp | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 1a7627c9099..c262ea8aadd 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -85,6 +85,9 @@ ELSEIF(UNIX) ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp ) + + ADD_DEFINITIONS(-DPREFIX="${CMAKE_INSTALL_PREFIX}") + ENDIF(APPLE) BLENDERLIB(bf_ghost "${SRC}" "${INC}") diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index c9228e68e54..961a637e616 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -67,6 +67,10 @@ #include <stdio.h> // for fprintf only #include <cstdlib> // for exit +#ifndef PREFIX +# define PREFIX "/usr/local" +#endif + typedef struct NDOFPlatformInfo { Display *display; Window window; @@ -1461,7 +1465,7 @@ void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const const GHOST_TUns8* GHOST_SystemX11::getSystemDir() const { - return (GHOST_TUns8*)"/usr/share"; + return (GHOST_TUns8*) PREFIX "/share"; } const GHOST_TUns8* GHOST_SystemX11::getUserDir() const |