diff options
-rw-r--r-- | CMakeLists.txt | 9 | ||||
-rw-r--r-- | source/blender/blenkernel/CMakeLists.txt | 7 | ||||
-rw-r--r-- | source/blender/blenlib/SConscript | 3 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 15 | ||||
-rw-r--r-- | source/creator/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/gameengine/GameLogic/CMakeLists.txt | 7 | ||||
-rw-r--r-- | source/gameengine/Ketsji/CMakeLists.txt | 21 |
7 files changed, 35 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a4796c2eee9..47daa1e4b9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,7 @@ OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON) OPTION(WITH_DDS "Enable DDS Support" ON) OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF) OPTION(WITH_PYTHON "Enable Embedded Python API" ON) +OPTION(WITH_SDL "Enable SDL for sound and joystick support" ON) OPTION(WITH_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF) OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON) OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF) @@ -133,9 +134,11 @@ IF(UNIX AND NOT APPLE) SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "") SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic") - FIND_PACKAGE(SDL) - SET(SDL_INC ${SDL_INCLUDE_DIR}) - SET(SDL_LIB ${SDL_LIBRARY}) + IF(WITH_SDL) + FIND_PACKAGE(SDL) + SET(SDL_INC ${SDL_INCLUDE_DIR}) + SET(SDL_LIB ${SDL_LIBRARY}) + ENDIF(WITH_SDL) FIND_PATH(OPENEXR_INC ImfXdr.h diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index ebe0ea74c28..92cc206667c 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -34,7 +34,6 @@ SET(INC ../../../extern/bullet2/src ../nodes ../../../extern/glew/include ../gpu ../makesrna ../../../intern/bsp/extern - ${SDL_INC} ${ZLIB_INC} ) @@ -55,6 +54,12 @@ IF(WITH_QUICKTIME) ADD_DEFINITIONS(-DWITH_QUICKTIME) ENDIF(WITH_QUICKTIME) +IF(WITH_SDL) + SET(INC ${INC} ${SDL_INC}) +ELSE(WITH_SDL) + ADD_DEFINITIONS(-DDISABLE_SDL) +ENDIF(WITH_SDL) + IF(WITH_FFMPEG) SET(INC ${INC} ${FFMPEG_INC}) ADD_DEFINITIONS(-DWITH_FFMPEG) diff --git a/source/blender/blenlib/SConscript b/source/blender/blenlib/SConscript index e0411a6fc80..3d7d6b63e64 100644 --- a/source/blender/blenlib/SConscript +++ b/source/blender/blenlib/SConscript @@ -9,9 +9,6 @@ incs += ' ' + env['BF_FREETYPE_INC'] incs += ' ' + env['BF_ZLIB_INC'] defs = '' -if env['WITH_BF_SDL']: - incs += ' ' + env['BF_SDL_INC'] - if env['OURPLATFORM'] == 'linux2': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 6a5d01d9466..04d70f5a758 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -511,6 +511,13 @@ void BPY_run_ui_scripts(bContext *C, int reload) if (de->d_name[0] == '.') { /* do nothing, probably .svn */ } + else if ((file_extension = strstr(de->d_name, ".py"))) { + /* normal py files? */ + if(file_extension && file_extension[3] == '\0') { + de->d_name[(file_extension - de->d_name) + 1] = '\0'; + bpy_import_module(de->d_name, reload); + } + } #ifndef __linux__ else if( BLI_join_dirfile(path, dirname, de->d_name), S_ISDIR(BLI_exists(path))) { #else @@ -523,14 +530,6 @@ void BPY_run_ui_scripts(bContext *C, int reload) if(BLI_exists(path)) { bpy_import_module(de->d_name, reload); } - } else { - /* normal py files */ - file_extension = strstr(de->d_name, ".py"); - - if(file_extension && file_extension[3] == '\0') { - de->d_name[(file_extension - de->d_name) + 1] = '\0'; - bpy_import_module(de->d_name, reload); - } } if(err==-1) { diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index b3371678534..35cb3e92b21 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -62,6 +62,10 @@ ELSE(WITH_PYTHON) ADD_DEFINITIONS(-DDISABLE_PYTHON) ENDIF(WITH_PYTHON) +IF(NOT WITH_SDL) + ADD_DEFINITIONS(-DDISABLE_SDL) +ENDIF(NOT WITH_SDL) + IF(CMAKE_SYSTEM_NAME MATCHES "Linux") ADD_DEFINITIONS(-DWITH_BINRELOC) INCLUDE_DIRECTORIES(${BINRELOC_INC}) diff --git a/source/gameengine/GameLogic/CMakeLists.txt b/source/gameengine/GameLogic/CMakeLists.txt index 7e2bc85bd1f..530664dce55 100644 --- a/source/gameengine/GameLogic/CMakeLists.txt +++ b/source/gameengine/GameLogic/CMakeLists.txt @@ -35,8 +35,13 @@ SET(INC ../../../intern/moto/include ../../../source/gameengine/Rasterizer ${PYTHON_INC} - ${SDL_INC} ) +IF(WITH_SDL) + SET(INC ${INC} ${SDL_INC}) +ELSE(WITH_SDL) + ADD_DEFINITIONS(-DDISABLE_SDL) +ENDIF(WITH_SDL) + BLENDERLIB(bf_logic "${SRC}" "${INC}") #env.BlenderLib ( 'bf_logic', sources, Split(incs), [], libtype=['game','player'], priority=[30, 110] ) diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt index ee1ff2c6502..f703841c40b 100644 --- a/source/gameengine/Ketsji/CMakeLists.txt +++ b/source/gameengine/Ketsji/CMakeLists.txt @@ -26,20 +26,6 @@ FILE(GLOB SRC *.cpp) -#XXX disabled for 2.5 because of missing python -#SET(SRC -# ${SRC} -# ../../../source/blender/python/api2_2x/Mathutils.c -# ../../../source/blender/python/api2_2x/Geometry.c -# ../../../source/blender/python/api2_2x/constant.c -# ../../../source/blender/python/api2_2x/euler.c -# ../../../source/blender/python/api2_2x/matrix.c -# ../../../source/blender/python/api2_2x/quat.c -# ../../../source/blender/python/api2_2x/vector.c -# ../../../source/blender/python/api2_2x/bpy_internal_import.c -# ../../../source/blender/python/api2_2x/BGL.c -#) - SET(INC . ../../../source/kernel/gen_system @@ -77,8 +63,13 @@ SET(INC ../../../extern/solid ../../../extern/glew/include ${PYTHON_INC} - ${SDL_INC} ) +IF(WITH_SDL) + SET(INC ${INC} ${SDL_INC}) +ELSE(WITH_SDL) + ADD_DEFINITIONS(-DDISABLE_SDL) +ENDIF(WITH_SDL) + BLENDERLIB(bf_ketsji "${SRC}" "${INC}") #env.BlenderLib ( 'bf_ketsji', sources, Split(incs), [], libtype=['game','player'], priority=[25, 72], compileflags = cflags ) |