diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-16 00:25:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-16 00:25:09 +0400 |
commit | a3e0667e943f8132f5773e300b86c9abfb92780a (patch) | |
tree | b19aa6b82693fc4eadb5187b51c5a47298af3d04 /intern | |
parent | f36ab733bf2aefd1ace438170b35d846885ff058 (diff) |
Rather then hard coded /usr/share, use CMAKE_INSTALL_PREFIX to set the PREFIX, could be added for scons/make too.
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 |