fix for scons with recent change to how BINRELOC is enabled via cmake.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 25 Feb 2011 14:45:45 +0000 (14:45 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 25 Feb 2011 14:45:45 +0000 (14:45 +0000)
also add WITH_PYTHON define to qtcreator project generator until we get a way to add them properly.

build_files/cmake/cmake_qtcreator_project.py
extern/SConscript
source/blender/blenlib/SConscript
source/blenderplayer/CMakeLists.txt

index ca21433..925aee5 100644 (file)
@@ -94,6 +94,8 @@ qtc_cfg = join(base, "%s.config" % PROJECT_NAME)
 if not exists(qtc_cfg):
     f = open(qtc_cfg, 'w')
     f.write("// ADD PREDEFINED MACROS HERE!\n")
+    # todo, include real defines.
+    f.write("#define WITH_PYTHON\n")
 
 print("Project file written to: %s" % qtc_prj)
 # --- end
index 22c7dc2..bd73d71 100644 (file)
@@ -13,7 +13,7 @@ if env['WITH_BF_OPENJPEG'] and env['BF_OPENJPEG_LIB'] == '':
 if env['WITH_BF_REDCODE'] and env['BF_REDCODE_LIB'] == '':
     SConscript(['libredcode/SConscript'])
 
-if env['OURPLATFORM'] == 'linux2':
+if env['WITH_BF_BINRELOC']:
     SConscript(['binreloc/SConscript']);
 
 if env['WITH_BF_LZO']:
index 57c4865..00caf8c 100644 (file)
@@ -7,11 +7,12 @@ cflags=''
 incs = '. ../makesdna ../blenkernel #/intern/guardedalloc #/intern/ghost ../editors/include ../gpu ../blenloader'
 incs += ' ' + env['BF_FREETYPE_INC']
 incs += ' ' + env['BF_ZLIB_INC']
-defs = ''
+defs = []
 
-if env['OURPLATFORM'] == 'linux2':
+if env['WITH_BF_BINRELOC']:
     cflags='-pthread'
     incs += ' ../../../extern/binreloc/include'
+    defs.append('WITH_BINRELOC')
 
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
     incs += ' ' + env['BF_PTHREADS_INC']
index 8f1730e..760ee16 100644 (file)
@@ -33,11 +33,6 @@ if(WITH_CODEC_QUICKTIME)
        add_definitions(-DWITH_QUICKTIME)
 endif()
 
-if(WITH_BINRELOC)
-       add_definitions(-DWITH_BINRELOC)
-       blender_include_dirs(${BINRELOC_INC})
-endif()
-
 add_custom_command(
        OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
        COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/makesdna ${CMAKE_CURRENT_BINARY_DIR}/dna.c ${CMAKE_SOURCE_DIR}/source/blender/makesdna/