[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35771] trunk/blender: dont return a system path if cmake's 'WITH_INSTALL_PORTABLE' is enabled.
Campbell Barton
ideasman42 at gmail.com
Fri Mar 25 06:23:59 CET 2011
Revision: 35771
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35771
Author: campbellbarton
Date: 2011-03-25 05:23:58 +0000 (Fri, 25 Mar 2011)
Log Message:
-----------
dont return a system path if cmake's 'WITH_INSTALL_PORTABLE' is enabled. this way portable builds wont find scripts in /usr/share.
Modified Paths:
--------------
trunk/blender/CMakeLists.txt
trunk/blender/intern/ghost/CMakeLists.txt
trunk/blender/intern/ghost/intern/GHOST_SystemPathsX11.cpp
trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp
trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp
Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt 2011-03-25 04:56:48 UTC (rev 35770)
+++ trunk/blender/CMakeLists.txt 2011-03-25 05:23:58 UTC (rev 35771)
@@ -111,11 +111,7 @@
# 3D format support
# disable opencollada on non-apple unix because opencollada has no package for debian
-if(UNIX AND NOT APPLE)
- option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" OFF)
-else()
- option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" OFF)
-endif()
+option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org)" OFF)
# Sound output
option(WITH_SDL "Enable SDL for sound and joystick support" ON)
Modified: trunk/blender/intern/ghost/CMakeLists.txt
===================================================================
--- trunk/blender/intern/ghost/CMakeLists.txt 2011-03-25 04:56:48 UTC (rev 35770)
+++ trunk/blender/intern/ghost/CMakeLists.txt 2011-03-25 05:23:58 UTC (rev 35771)
@@ -137,7 +137,9 @@
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)
Modified: trunk/blender/intern/ghost/intern/GHOST_SystemPathsX11.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemPathsX11.cpp 2011-03-25 04:56:48 UTC (rev 35770)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemPathsX11.cpp 2011-03-25 05:23:58 UTC (rev 35771)
@@ -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 @@
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
Modified: trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp 2011-03-25 04:56:48 UTC (rev 35770)
+++ trunk/blender/intern/ghost/intern/GHOST_SystemX11.cpp 2011-03-25 05:23:58 UTC (rev 35771)
@@ -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;
Modified: trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp 2011-03-25 04:56:48 UTC (rev 35770)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowX11.cpp 2011-03-25 05:23:58 UTC (rev 35771)
@@ -455,6 +455,7 @@
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 @@
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
More information about the Bf-blender-cvs
mailing list