Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-07-16 00:25:09 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-16 00:25:09 +0400
commita3e0667e943f8132f5773e300b86c9abfb92780a (patch)
treeb19aa6b82693fc4eadb5187b51c5a47298af3d04 /intern
parentf36ab733bf2aefd1ace438170b35d846885ff058 (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.txt3
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp6
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