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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-12-31 23:01:31 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-12-31 23:31:08 +0300
commite9596e5deff93364a0fe588f8e8e408fcbcc2b96 (patch)
tree25d2a149aa9c6b77679e81337086a34a616a50b8 /intern/cycles/util
parentb8fc4fe5aa542064c44db3476c8d8911bf674f01 (diff)
Cycles: Post-reintegration tweaks to ensure things do compile
This commit contains all the tweaks which were missing in initial patch re-integration from the standalone Cycles repository. This commit also contains an utility cmake macro to help linking targets with different libraries for release/debug builds, the name currently is target_link_libraries_decoupled it gets a target and list of libraries and makes sure debug builds are using libraries with "_d" suffix. After all this changes it'll hopefully be easier to interchange patches between blender and standalone repositories, because they're now quite identical.
Diffstat (limited to 'intern/cycles/util')
-rw-r--r--intern/cycles/util/CMakeLists.txt4
-rw-r--r--intern/cycles/util/util_opengl.h8
2 files changed, 11 insertions, 1 deletions
diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt
index 336e5e1711d..d52bcd6a7aa 100644
--- a/intern/cycles/util/CMakeLists.txt
+++ b/intern/cycles/util/CMakeLists.txt
@@ -21,6 +21,10 @@ set(SRC
util_transform.cpp
)
+if(NOT CYCLES_STANDALONE_REPOSITORY)
+ add_definitions(-DWITH_GLEW_MX)
+endif()
+
if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI)
list(APPEND SRC
util_view.cpp
diff --git a/intern/cycles/util/util_opengl.h b/intern/cycles/util/util_opengl.h
index 2e3963612cd..0b5462e0a09 100644
--- a/intern/cycles/util/util_opengl.h
+++ b/intern/cycles/util/util_opengl.h
@@ -20,6 +20,12 @@
/* OpenGL header includes, used everywhere we use OpenGL, to deal with
* platform differences in one central place. */
-#include "glew-mx.h"
+#ifdef WITH_GLEW_MX
+# include "glew-mx.h"
+#else
+# include <GL/glew.h>
+# define mxCreateContext() glewInit()
+# define mxMakeCurrentContext(x) (x)
+#endif
#endif /* __UTIL_OPENGL_H__ */