dont return a system path if cmake's 'WITH_INSTALL_PORTABLE' is enabled. this way portable builds wont find scripts in /usr/share.

This commit is contained in:
Campbell Barton
2011-03-25 05:23:58 +00:00
parent 5f8fa29755
commit 06b04fa886
5 changed files with 10 additions and 16 deletions

View File

@@ -111,11 +111,7 @@ endif()
# 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()
# Sound output
option(WITH_SDL "Enable SDL for sound and joystick support" ON)

View File

@@ -137,7 +137,9 @@ elseif(UNIX)
intern/GHOST_WindowX11.h
)
if(NOT WITH_INSTALL_PORTABLE)
add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
endif()
if(X11_XF86keysym_INCLUDE_PATH)
add_definitions(-DWITH_XF86KEYSYM)

View File

@@ -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

View File

@@ -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;

View File

@@ -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