From 7dc33e3ef8429d7d541e8c0291826a2d42c56566 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 1 Feb 2013 06:24:49 +0000 Subject: [PATCH] Move opencl and reigidbody from source/blender/ to intern/ This modules does not depend on any blender-specific data structures or algorithms and due to our policy better be placed to intern/ Shall be no functional changes, tested CMake and SCons on Linux, hopefully other platforms will work as well. P.S. SVN history shall be preserved for the files. --- intern/CMakeLists.txt | 8 ++++++++ intern/SConscript | 6 ++++++ {source/blender => intern}/opencl/CMakeLists.txt | 2 +- {source/blender => intern}/opencl/OCL_opencl.h | 0 {source/blender => intern}/opencl/SConscript | 2 +- {source/blender => intern}/opencl/intern/OCL_opencl.c | 0 {source/blender => intern}/opencl/intern/clew.c | 0 {source/blender => intern}/opencl/intern/clew.h | 0 {source/blender => intern}/rigidbody/CMakeLists.txt | 4 ++-- {source/blender => intern}/rigidbody/RBI_api.h | 0 {source/blender => intern}/rigidbody/SConscript | 4 ++-- {source/blender => intern}/rigidbody/rb_bullet_api.cpp | 0 source/blender/CMakeLists.txt | 5 ----- source/blender/SConscript | 6 +----- source/blender/blenkernel/CMakeLists.txt | 2 +- source/blender/blenkernel/SConscript | 2 +- source/blender/compositor/CMakeLists.txt | 2 +- source/blender/compositor/SConscript | 2 +- source/blender/editors/physics/CMakeLists.txt | 2 +- source/blender/editors/physics/SConscript | 2 +- source/blender/makesrna/SConscript | 3 +-- source/blender/makesrna/intern/CMakeLists.txt | 2 +- source/blender/makesrna/intern/SConscript | 2 +- source/blenderplayer/CMakeLists.txt | 2 +- source/creator/CMakeLists.txt | 4 ++-- 25 files changed, 33 insertions(+), 29 deletions(-) rename {source/blender => intern}/opencl/CMakeLists.txt (94%) rename {source/blender => intern}/opencl/OCL_opencl.h (100%) rename {source/blender => intern}/opencl/SConscript (90%) rename {source/blender => intern}/opencl/intern/OCL_opencl.c (100%) rename {source/blender => intern}/opencl/intern/clew.c (100%) rename {source/blender => intern}/opencl/intern/clew.h (100%) rename {source/blender => intern}/rigidbody/CMakeLists.txt (91%) rename {source/blender => intern}/rigidbody/RBI_api.h (100%) rename {source/blender => intern}/rigidbody/SConscript (93%) rename {source/blender => intern}/rigidbody/rb_bullet_api.cpp (100%) diff --git a/intern/CMakeLists.txt b/intern/CMakeLists.txt index be797c45ba1..bb8cd7aaf70 100644 --- a/intern/CMakeLists.txt +++ b/intern/CMakeLists.txt @@ -69,6 +69,14 @@ if(WITH_INTERNATIONAL) add_subdirectory(locale) endif() +if(WITH_BULLET) + add_subdirectory(rigidbody) +endif() + +if(WITH_COMPOSITOR) + add_subdirectory(opencl) +endif() + # only windows needs utf16 converter if(WIN32) add_subdirectory(utfconv) diff --git a/intern/SConscript b/intern/SConscript index a35c99bbbaa..828c1adc20d 100644 --- a/intern/SConscript +++ b/intern/SConscript @@ -59,6 +59,12 @@ if env['WITH_BF_BOOLEAN']: if env['WITH_BF_INTERNATIONAL']: SConscript(['locale/SConscript']) +if env['WITH_BF_BULLET']: + SConscript (['rigidbody/SConscript']) + +if env['WITH_BF_COMPOSITOR']: + SConscript (['opencl/SConscript']) + if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-mingw', 'linuxcross', 'win64-vc'): SConscript(['utfconv/SConscript']) diff --git a/source/blender/opencl/CMakeLists.txt b/intern/opencl/CMakeLists.txt similarity index 94% rename from source/blender/opencl/CMakeLists.txt rename to intern/opencl/CMakeLists.txt index b3c76db1bca..03855cfdf8b 100644 --- a/source/blender/opencl/CMakeLists.txt +++ b/intern/opencl/CMakeLists.txt @@ -39,4 +39,4 @@ set(SRC ) -blender_add_lib(bf_opencl "${SRC}" "${INC}" "${INC_SYS}") +blender_add_lib(bf_intern_opencl "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/opencl/OCL_opencl.h b/intern/opencl/OCL_opencl.h similarity index 100% rename from source/blender/opencl/OCL_opencl.h rename to intern/opencl/OCL_opencl.h diff --git a/source/blender/opencl/SConscript b/intern/opencl/SConscript similarity index 90% rename from source/blender/opencl/SConscript rename to intern/opencl/SConscript index 388789a5b50..41a6d720098 100644 --- a/source/blender/opencl/SConscript +++ b/intern/opencl/SConscript @@ -31,4 +31,4 @@ sources = env.Glob('intern/*.c') incs = '.' -env.BlenderLib ( 'bf_opencl', sources, Split(incs), libtype=['core','player'], priority = [192,192] ) +env.BlenderLib ( 'bf_intern_opencl', sources, Split(incs), libtype=['core','player'], priority = [192,192] ) diff --git a/source/blender/opencl/intern/OCL_opencl.c b/intern/opencl/intern/OCL_opencl.c similarity index 100% rename from source/blender/opencl/intern/OCL_opencl.c rename to intern/opencl/intern/OCL_opencl.c diff --git a/source/blender/opencl/intern/clew.c b/intern/opencl/intern/clew.c similarity index 100% rename from source/blender/opencl/intern/clew.c rename to intern/opencl/intern/clew.c diff --git a/source/blender/opencl/intern/clew.h b/intern/opencl/intern/clew.h similarity index 100% rename from source/blender/opencl/intern/clew.h rename to intern/opencl/intern/clew.h diff --git a/source/blender/rigidbody/CMakeLists.txt b/intern/rigidbody/CMakeLists.txt similarity index 91% rename from source/blender/rigidbody/CMakeLists.txt rename to intern/rigidbody/CMakeLists.txt index 903fbe66f01..a323e55e570 100644 --- a/source/blender/rigidbody/CMakeLists.txt +++ b/intern/rigidbody/CMakeLists.txt @@ -23,7 +23,7 @@ SET(INC . - ../../../extern/bullet2/src + ../../extern/bullet2/src ) set(SRC @@ -32,4 +32,4 @@ set(SRC RBI_api.h ) -blender_add_lib(bf_rigidbody "${SRC}" "${INC}" "${INC_SYS}") +blender_add_lib(bf_intern_rigidbody "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/rigidbody/RBI_api.h b/intern/rigidbody/RBI_api.h similarity index 100% rename from source/blender/rigidbody/RBI_api.h rename to intern/rigidbody/RBI_api.h diff --git a/source/blender/rigidbody/SConscript b/intern/rigidbody/SConscript similarity index 93% rename from source/blender/rigidbody/SConscript rename to intern/rigidbody/SConscript index 14c80304983..977281f8eef 100644 --- a/source/blender/rigidbody/SConscript +++ b/intern/rigidbody/SConscript @@ -34,9 +34,9 @@ sources = env.Glob('*.cpp') incs = [ '.', - '../../../extern/bullet2/src', + '../../extern/bullet2/src', ] -env.BlenderLib('bf_rigidbody', sources=sources, +env.BlenderLib('bf_intern_rigidbody', sources=sources, includes=incs, defines=[], libtype=['core', 'player'], priority=[180, 30]) diff --git a/source/blender/rigidbody/rb_bullet_api.cpp b/intern/rigidbody/rb_bullet_api.cpp similarity index 100% rename from source/blender/rigidbody/rb_bullet_api.cpp rename to intern/rigidbody/rb_bullet_api.cpp diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt index 36b05fd31f4..50e13188965 100644 --- a/source/blender/CMakeLists.txt +++ b/source/blender/CMakeLists.txt @@ -107,12 +107,7 @@ add_subdirectory(modifiers) add_subdirectory(makesdna) add_subdirectory(makesrna) -if(WITH_BULLET) - add_subdirectory(rigidbody) -endif() - if(WITH_COMPOSITOR) - add_subdirectory(opencl) # later on this may be used more generally add_subdirectory(compositor) endif() diff --git a/source/blender/SConscript b/source/blender/SConscript index 80457c739b6..8a4e2a39aa1 100644 --- a/source/blender/SConscript +++ b/source/blender/SConscript @@ -61,12 +61,8 @@ if env['WITH_BF_OPENEXR']: if env['WITH_BF_QUICKTIME']: SConscript (['quicktime/SConscript']) -if env['WITH_BF_BULLET']: - SConscript (['rigidbody/SConscript']) - if env['WITH_BF_COLLADA']: SConscript (['collada/SConscript']) if env['WITH_BF_COMPOSITOR']: - SConscript (['compositor/SConscript', - 'opencl/SConscript']) + SConscript (['compositor/SConscript']) diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index fefd4c89fbe..cb6da194dad 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -264,7 +264,7 @@ if(WITH_BULLET) ${BULLET_INCLUDE_DIRS} ) list(APPEND INC - ../rigidbody + ../../../intern/rigidbody ) add_definitions(-DWITH_BULLET) endif() diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index e53e4724071..aa7d8a51b8c 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -41,7 +41,7 @@ incs += ' ../render/extern/include ../makesrna' incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes ../modifiers' incs += ' #/intern/iksolver/extern ../blenloader' incs += ' #/extern/bullet2/src' -incs += ' ../rigidbody' +incs += ' #/intern/rigidbody' incs += ' #/intern/opennl/extern #/intern/bsp/extern' incs += ' ../gpu #/extern/glew/include' incs += ' ../bmesh' diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt index 0e8ddf4068c..efecf1a7565 100644 --- a/source/blender/compositor/CMakeLists.txt +++ b/source/blender/compositor/CMakeLists.txt @@ -35,13 +35,13 @@ set(INC ../imbuf ../makesdna ../makesrna - ../opencl ../windowmanager ../nodes ../nodes/composite ../nodes/intern ../render/extern/include ../render/intern/include + ../../../intern/opencl ../../../intern/guardedalloc ) diff --git a/source/blender/compositor/SConscript b/source/blender/compositor/SConscript index 1872bf2afac..64169ac7403 100644 --- a/source/blender/compositor/SConscript +++ b/source/blender/compositor/SConscript @@ -32,7 +32,7 @@ sources = env.Glob('intern/*.cpp') + env.Glob('nodes/*.cpp') + env.Glob('operati incs = '. nodes intern operations ../blenlib ../blenkernel ../makesdna ../render/extern/include ../render/intern/include' incs += ' ../makesrna ../blenloader ../../../intern/guardedalloc ../imbuf ../windowmanager ' -incs += '../opencl ../nodes ../nodes/intern ../nodes/composite ' +incs += '#intern/opencl ../nodes ../nodes/intern ../nodes/composite ' if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt index 435327319aa..29d8aec4224 100644 --- a/source/blender/editors/physics/CMakeLists.txt +++ b/source/blender/editors/physics/CMakeLists.txt @@ -64,7 +64,7 @@ endif() if(WITH_BULLET) list(APPEND INC - ../../rigidbody + ../../../../intern/rigidbody ) add_definitions(-DWITH_BULLET) endif() diff --git a/source/blender/editors/physics/SConscript b/source/blender/editors/physics/SConscript index b68cc944925..7916ea24bde 100644 --- a/source/blender/editors/physics/SConscript +++ b/source/blender/editors/physics/SConscript @@ -33,7 +33,7 @@ incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../gpu ../../blenloader ../../bmesh' incs += ' ../../makesrna ../../render/extern/include #/intern/elbeem/extern' -incs += ' ../../rigidbody' +incs += ' #/intern/rigidbody' defs = [] diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index 47750617e55..6031e797905 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -38,7 +38,6 @@ incs += ' ../render/extern/include #/intern/cycles/blender' incs += ' ../nodes' incs += ' #/extern/glew/include' incs += ' #/intern/smoke/extern' -incs += ' ../rigidbody' incs += ' ../bmesh' @@ -49,7 +48,7 @@ if env['WITH_BF_SMOKE']: if env['WITH_BF_BULLET']: defs.append('WITH_BULLET') - incs += ' ../../rigidbody' + incs += ' #/intern/rigidbody' if env['WITH_BF_OPENEXR']: defs.append('WITH_OPENEXR') diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 210857a4690..849c61f30b3 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -240,7 +240,7 @@ endif() if(WITH_BULLET) list(APPEND INC - ../../rigidbody + ../../../../intern/rigidbody ) add_definitions(-DWITH_BULLET) endif() diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 33d43e1e019..f8608f0c28b 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -68,7 +68,7 @@ if env['WITH_BF_SMOKE']: if env['WITH_BF_BULLET']: defs.append('WITH_BULLET') - incs += ' ../../rigidbody' + incs += ' #/intern/rigidbody' if env['WITH_BF_OPENEXR']: defs.append('WITH_OPENEXR') diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt index b2a47115630..fb06c5e4477 100644 --- a/source/blenderplayer/CMakeLists.txt +++ b/source/blenderplayer/CMakeLists.txt @@ -95,7 +95,7 @@ endif() bf_rna bf_bmesh bf_blenkernel - bf_rigidbody + bf_intern_rigidbody bf_blenloader ge_blen_routines bf_editor_datafiles diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 2115b2a5ff6..bb5f34167bc 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -918,7 +918,7 @@ endif() if(WITH_COMPOSITOR) # added for opencl compositor list_insert_before(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_compositor") - list_insert_after(BLENDER_SORTED_LIBS "bf_compositor" "bf_opencl") + list_insert_after(BLENDER_SORTED_LIBS "bf_compositor" "bf_intern_opencl") endif() if(WITH_LIBMV) @@ -971,7 +971,7 @@ endif() endif() if(WITH_BULLET) - list_insert_after(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_rigidbody") + list_insert_after(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_intern_rigidbody") endif() if(WITH_BULLET AND NOT WITH_BULLET_SYSTEM)