forked from bartvdbraak/blender
cmake option to disable SDL,
bpy_interface.c - change order of checking scripts to avoid calling stat on .py files.
This commit is contained in:
parent
b76009232e
commit
4d0a6fee4a
@ -63,6 +63,7 @@ OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
|
|||||||
OPTION(WITH_DDS "Enable DDS Support" ON)
|
OPTION(WITH_DDS "Enable DDS Support" ON)
|
||||||
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
|
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
|
||||||
OPTION(WITH_PYTHON "Enable Embedded Python API" ON)
|
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_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF)
|
||||||
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
|
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
|
||||||
OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF)
|
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_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
|
||||||
SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
|
SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
|
||||||
|
|
||||||
|
IF(WITH_SDL)
|
||||||
FIND_PACKAGE(SDL)
|
FIND_PACKAGE(SDL)
|
||||||
SET(SDL_INC ${SDL_INCLUDE_DIR})
|
SET(SDL_INC ${SDL_INCLUDE_DIR})
|
||||||
SET(SDL_LIB ${SDL_LIBRARY})
|
SET(SDL_LIB ${SDL_LIBRARY})
|
||||||
|
ENDIF(WITH_SDL)
|
||||||
|
|
||||||
FIND_PATH(OPENEXR_INC
|
FIND_PATH(OPENEXR_INC
|
||||||
ImfXdr.h
|
ImfXdr.h
|
||||||
|
@ -34,7 +34,6 @@ SET(INC
|
|||||||
../../../extern/bullet2/src
|
../../../extern/bullet2/src
|
||||||
../nodes ../../../extern/glew/include ../gpu ../makesrna
|
../nodes ../../../extern/glew/include ../gpu ../makesrna
|
||||||
../../../intern/bsp/extern
|
../../../intern/bsp/extern
|
||||||
${SDL_INC}
|
|
||||||
${ZLIB_INC}
|
${ZLIB_INC}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -55,6 +54,12 @@ IF(WITH_QUICKTIME)
|
|||||||
ADD_DEFINITIONS(-DWITH_QUICKTIME)
|
ADD_DEFINITIONS(-DWITH_QUICKTIME)
|
||||||
ENDIF(WITH_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)
|
IF(WITH_FFMPEG)
|
||||||
SET(INC ${INC} ${FFMPEG_INC})
|
SET(INC ${INC} ${FFMPEG_INC})
|
||||||
ADD_DEFINITIONS(-DWITH_FFMPEG)
|
ADD_DEFINITIONS(-DWITH_FFMPEG)
|
||||||
|
@ -9,9 +9,6 @@ incs += ' ' + env['BF_FREETYPE_INC']
|
|||||||
incs += ' ' + env['BF_ZLIB_INC']
|
incs += ' ' + env['BF_ZLIB_INC']
|
||||||
defs = ''
|
defs = ''
|
||||||
|
|
||||||
if env['WITH_BF_SDL']:
|
|
||||||
incs += ' ' + env['BF_SDL_INC']
|
|
||||||
|
|
||||||
if env['OURPLATFORM'] == 'linux2':
|
if env['OURPLATFORM'] == 'linux2':
|
||||||
cflags='-pthread'
|
cflags='-pthread'
|
||||||
incs += ' ../../../extern/binreloc/include'
|
incs += ' ../../../extern/binreloc/include'
|
||||||
|
@ -511,6 +511,13 @@ void BPY_run_ui_scripts(bContext *C, int reload)
|
|||||||
if (de->d_name[0] == '.') {
|
if (de->d_name[0] == '.') {
|
||||||
/* do nothing, probably .svn */
|
/* 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__
|
#ifndef __linux__
|
||||||
else if( BLI_join_dirfile(path, dirname, de->d_name), S_ISDIR(BLI_exists(path))) {
|
else if( BLI_join_dirfile(path, dirname, de->d_name), S_ISDIR(BLI_exists(path))) {
|
||||||
#else
|
#else
|
||||||
@ -523,14 +530,6 @@ void BPY_run_ui_scripts(bContext *C, int reload)
|
|||||||
if(BLI_exists(path)) {
|
if(BLI_exists(path)) {
|
||||||
bpy_import_module(de->d_name, reload);
|
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) {
|
if(err==-1) {
|
||||||
|
@ -62,6 +62,10 @@ ELSE(WITH_PYTHON)
|
|||||||
ADD_DEFINITIONS(-DDISABLE_PYTHON)
|
ADD_DEFINITIONS(-DDISABLE_PYTHON)
|
||||||
ENDIF(WITH_PYTHON)
|
ENDIF(WITH_PYTHON)
|
||||||
|
|
||||||
|
IF(NOT WITH_SDL)
|
||||||
|
ADD_DEFINITIONS(-DDISABLE_SDL)
|
||||||
|
ENDIF(NOT WITH_SDL)
|
||||||
|
|
||||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
ADD_DEFINITIONS(-DWITH_BINRELOC)
|
ADD_DEFINITIONS(-DWITH_BINRELOC)
|
||||||
INCLUDE_DIRECTORIES(${BINRELOC_INC})
|
INCLUDE_DIRECTORIES(${BINRELOC_INC})
|
||||||
|
@ -35,8 +35,13 @@ SET(INC
|
|||||||
../../../intern/moto/include
|
../../../intern/moto/include
|
||||||
../../../source/gameengine/Rasterizer
|
../../../source/gameengine/Rasterizer
|
||||||
${PYTHON_INC}
|
${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}")
|
BLENDERLIB(bf_logic "${SRC}" "${INC}")
|
||||||
#env.BlenderLib ( 'bf_logic', sources, Split(incs), [], libtype=['game','player'], priority=[30, 110] )
|
#env.BlenderLib ( 'bf_logic', sources, Split(incs), [], libtype=['game','player'], priority=[30, 110] )
|
||||||
|
@ -26,20 +26,6 @@
|
|||||||
|
|
||||||
FILE(GLOB SRC *.cpp)
|
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
|
SET(INC
|
||||||
.
|
.
|
||||||
../../../source/kernel/gen_system
|
../../../source/kernel/gen_system
|
||||||
@ -77,8 +63,13 @@ SET(INC
|
|||||||
../../../extern/solid
|
../../../extern/solid
|
||||||
../../../extern/glew/include
|
../../../extern/glew/include
|
||||||
${PYTHON_INC}
|
${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}")
|
BLENDERLIB(bf_ketsji "${SRC}" "${INC}")
|
||||||
#env.BlenderLib ( 'bf_ketsji', sources, Split(incs), [], libtype=['game','player'], priority=[25, 72], compileflags = cflags )
|
#env.BlenderLib ( 'bf_ketsji', sources, Split(incs), [], libtype=['game','player'], priority=[25, 72], compileflags = cflags )
|
||||||
|
Loading…
Reference in New Issue
Block a user