[Bf-blender-cvs] [551ebaa] soc-2014-viewport_fx: Fix compilation on linux (Ubuntu 14.04 used here).

Antony Riakiotakis noreply at git.blender.org
Mon Sep 8 15:33:58 CEST 2014


Commit: 551ebaa3dd758bc1975548c28766bfa3159d3846
Author: Antony Riakiotakis
Date:   Mon Sep 8 15:33:42 2014 +0200
Branches: soc-2014-viewport_fx
https://developer.blender.org/rB551ebaa3dd758bc1975548c28766bfa3159d3846

Fix compilation on linux (Ubuntu 14.04 used here).

===================================================================

M	CMakeLists.txt
M	intern/ghost/intern/GHOST_ContextGLX.cpp
M	source/blender/gpu/GPU_safety.h
M	source/blender/gpu/intern/gpu_extensions.c
M	source/blender/gpu/intern/gpu_state_latch.c

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5b3c83f..432e5eb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -640,11 +640,11 @@ if(WITH_X11)
 	find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
 	mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
 
-	list(APPEND PLATFORM_LINKLIBS "${X11_X11_LIB}")
+	list(APPEND PLATFORM_LINKLIBS ${X11_X11_LIB})
 
 	if(WITH_X11_XINPUT)
 		if(X11_Xinput_LIB)
-			set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xinput_LIB}")
+			list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
 		else()
 			set(WITH_X11_XINPUT OFF)
 		endif()
@@ -655,7 +655,7 @@ if(WITH_X11)
 		FIND_LIBRARY(X11_Xxf86vmode_LIB Xxf86vm   ${X11_LIB_SEARCH_PATH})
 		mark_as_advanced(X11_Xxf86vmode_LIB)
 		if(X11_Xxf86vmode_LIB)
-			set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xxf86vmode_LIB}")
+			list(APPEND PLATFORM_LINKLIBS ${X11_Xxf86vmode_LIB})
 		else()
 			set(WITH_X11_XF86VMODE OFF)
 		endif()
diff --git a/intern/ghost/intern/GHOST_ContextGLX.cpp b/intern/ghost/intern/GHOST_ContextGLX.cpp
index 110124c..a78483b 100644
--- a/intern/ghost/intern/GHOST_ContextGLX.cpp
+++ b/intern/ghost/intern/GHOST_ContextGLX.cpp
@@ -31,12 +31,14 @@
  */
 
 #include "GHOST_ContextGLX.h"
+#include "GHOST_SystemX11.h"
 
 #include <vector>
 
 #include <cassert>
 #include <cstdlib>
-
+#include <cstdio>
+#include <cstring>
 
 
 GLXEWContext* glxewContext = NULL;
diff --git a/source/blender/gpu/GPU_safety.h b/source/blender/gpu/GPU_safety.h
index 4d008ee..36e032d 100644
--- a/source/blender/gpu/GPU_safety.h
+++ b/source/blender/gpu/GPU_safety.h
@@ -35,7 +35,7 @@
 
 
 #ifndef GPU_SAFETY
-#if (!defined(NDEBUG) && WITH_GPU_SAFETY)
+#if !defined(NDEBUG) && defined(WITH_GPU_SAFETY)
 #define GPU_SAFETY 1
 #else
 #define GPU_SAFETY 0
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index 217baba..6c4d101 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -952,11 +952,11 @@ struct GPUFrameBuffer {
 
 GPUFrameBuffer *GPU_framebuffer_create(void)
 {
+	GPUFrameBuffer *fb;
+
 	if (GG.extdisabled || !GG.framebuffersupport)
 		return NULL;
 
-	GPUFrameBuffer *fb;
-
 	fb = (GPUFrameBuffer*)MEM_callocN(sizeof(GPUFrameBuffer), "GPUFrameBuffer");
 	gpu_glGenFramebuffers(1, &fb->object);
 
diff --git a/source/blender/gpu/intern/gpu_state_latch.c b/source/blender/gpu/intern/gpu_state_latch.c
index a66c492..3ad8fc5 100644
--- a/source/blender/gpu/intern/gpu_state_latch.c
+++ b/source/blender/gpu/intern/gpu_state_latch.c
@@ -35,7 +35,7 @@
 #include "intern/gpu_state_latch_intern.h"
 
 /* my library */
-#include "GPU_profile.h"
+#include "gpu_profile.h"
 #include "GPU_safety.h"
 
 /* internal */




More information about the Bf-blender-cvs mailing list