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
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-03-25 08:23:58 +0300
committerCampbell Barton <ideasman42@gmail.com>2011-03-25 08:23:58 +0300
commit06b04fa8862eee030ea4024f020992664c3457fe (patch)
tree774684867d6ac3539956ee0ba1e268a49deb604f /intern/ghost
parent5f8fa29755a062a3dff4a574c904f5e24cc48cca (diff)
dont return a system path if cmake's 'WITH_INSTALL_PORTABLE' is enabled. this way portable builds wont find scripts in /usr/share.
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/CMakeLists.txt4
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsX11.cpp10
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp4
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp2
4 files changed, 9 insertions, 11 deletions
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index d629b44a106..6c86cf82f0e 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -137,7 +137,9 @@ elseif(UNIX)
intern/GHOST_WindowX11.h
)
- add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
+ if(NOT WITH_INSTALL_PORTABLE)
+ add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
+ endif()
if(X11_XF86keysym_INCLUDE_PATH)
add_definitions(-DWITH_XF86KEYSYM)
diff --git a/intern/ghost/intern/GHOST_SystemPathsX11.cpp b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
index 30c45de47bc..dd8935732c5 100644
--- a/intern/ghost/intern/GHOST_SystemPathsX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemPathsX11.cpp
@@ -43,11 +43,6 @@
#include <stdio.h> // for fprintf only
#include <cstdlib> // for exit
-#ifndef PREFIX
-# define PREFIX "/usr/local"
-#endif
-
-
using namespace std;
GHOST_SystemPathsX11::GHOST_SystemPathsX11()
@@ -60,7 +55,12 @@ GHOST_SystemPathsX11::~GHOST_SystemPathsX11()
const GHOST_TUns8* GHOST_SystemPathsX11::getSystemDir() const
{
+ /* no prefix assumes a portable build which only uses bundled scripts */
+#ifdef PREFIX
return (GHOST_TUns8*) PREFIX "/share";
+#else
+ return NULL;
+#endif
}
const GHOST_TUns8* GHOST_SystemPathsX11::getUserDir() const
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index 36748b9f295..e2ee7044392 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -76,10 +76,6 @@
#include <stdio.h> // for fprintf only
#include <cstdlib> // for exit
-#ifndef PREFIX
-#error "PREFIX not defined"
-#endif
-
typedef struct NDOFPlatformInfo {
Display *display;
Window window;
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 3578ae8619f..aea5b5156d9 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -455,6 +455,7 @@ GHOST_WindowX11(
XFlush(m_display);
}
+#ifdef WITH_X11_XINPUT
/*
Dummy function to get around IO Handler exiting if device invalid
Basically it will not crash blender now if you have a X device that
@@ -495,7 +496,6 @@ static bool match_token(const char *haystack, const char *needle)
return FALSE;
}
-#ifdef WITH_X11_XINPUT
/* Determining if an X device is a Tablet style device is an imperfect science.
** We rely on common conventions around device names as well as the type reported