diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-31 23:01:31 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-31 23:31:08 +0300 |
commit | e9596e5deff93364a0fe588f8e8e408fcbcc2b96 (patch) | |
tree | 25d2a149aa9c6b77679e81337086a34a616a50b8 /intern | |
parent | b8fc4fe5aa542064c44db3476c8d8911bf674f01 (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')
-rw-r--r-- | intern/cycles/CMakeLists.txt | 9 | ||||
-rw-r--r-- | intern/cycles/SConscript | 2 | ||||
-rw-r--r-- | intern/cycles/app/CMakeLists.txt | 1 | ||||
-rw-r--r-- | intern/cycles/cmake/external_libs.cmake | 3 | ||||
-rw-r--r-- | intern/cycles/kernel/osl/SConscript | 2 | ||||
-rw-r--r-- | intern/cycles/util/CMakeLists.txt | 4 | ||||
-rw-r--r-- | intern/cycles/util/util_opengl.h | 8 |
7 files changed, 21 insertions, 8 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index 4facb8d4ff9..2ba6af48d0d 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -179,10 +179,11 @@ include_directories( ${PUGIXML_INCLUDE_DIR} ) -# TODO(sergey): Adjust so standalone repository is also happy. -include_directories( - ../atomic -) +if(CYCLES_STANDALONE_REPOSITORY) + include_directories(../third_party/atomic) +else() + include_directories(../atomic) +endif() # Warnings if(CMAKE_COMPILER_IS_GNUCXX) diff --git a/intern/cycles/SConscript b/intern/cycles/SConscript index fd7ac974ab0..9cbdb93ce85 100644 --- a/intern/cycles/SConscript +++ b/intern/cycles/SConscript @@ -65,7 +65,7 @@ if env['WITH_BF_CYCLES_DEBUG']: if env['WITH_BF_CYCLES_LOGGING']: defs.append('WITH_CYCLES_LOGGING') defs.append('GOOGLE_GLOG_DLL_DECL=') - defs.append('GFLAGS_NAMESPACE=gflags') + defs.append('CYCLES_GFLAGS_NAMESPACE=gflags') if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): incs.append('#extern/libmv/third_party/glog/src/windows') incs.append('#extern/libmv/third_party/gflags') diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt index 6e7b650565f..f6a6f96280f 100644 --- a/intern/cycles/app/CMakeLists.txt +++ b/intern/cycles/app/CMakeLists.txt @@ -45,6 +45,7 @@ if(CYCLES_STANDALONE_REPOSITORY) endif() else() list(APPEND LIBRARIES bf_intern_glew_mx) + list(APPEND LIBRARIES extern_glog) endif() if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI) diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake index d036f3e7ab9..d7c59f42a5e 100644 --- a/intern/cycles/cmake/external_libs.cmake +++ b/intern/cycles/cmake/external_libs.cmake @@ -136,5 +136,6 @@ else() set(GLOG_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/libmv/third_party/glog/src) set(GFLAGS_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/libmv/third_party/gflags) endif() - set(GFLAGS_NAMESPACE gflags) + set(GFLAGS_NAMESPACE "gflags") + set(LLVM_LIBRARIES ${LLVM_LIBRARY}) endif() diff --git a/intern/cycles/kernel/osl/SConscript b/intern/cycles/kernel/osl/SConscript index 1cb6b6a7b47..58b0204a1b9 100644 --- a/intern/cycles/kernel/osl/SConscript +++ b/intern/cycles/kernel/osl/SConscript @@ -50,7 +50,7 @@ if env['WITH_BF_CYCLES_DEBUG']: if env['WITH_BF_CYCLES_LOGGING']: defs.append('WITH_CYCLES_LOGGING') defs.append('GOOGLE_GLOG_DLL_DECL=') - defs.append('GFLAGS_NAMESPACE=gflags') + defs.append('CYCLES_GFLAGS_NAMESPACE=gflags') if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): incs.append('#extern/libmv/third_party/glog/src/windows') incs.append('#extern/libmv/third_party/gflags') 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__ */ |