Fix #19574: winbuildinfo.h error when compiling with cmake on windows. I've now remov...
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 19 Oct 2009 16:55:51 +0000 (16:55 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 19 Oct 2009 16:55:51 +0000 (16:55 +0000)
source/creator/buildinfo.c
tools/Blender.py

index ac14010f572fbbeb27f199cf76504560edc4c619..3473814360ba3a2d0afdde94f483283dda944886 100644 (file)
 #endif
 
 #ifdef BUILD_DATE
-#if (!defined(WIN32) || defined(_WIN64))
 const char * build_date=BUILD_DATE;
 const char * build_time=BUILD_TIME;
 const char * build_rev=BUILD_REV;
 const char * build_platform=BUILD_PLATFORM;
 const char * build_type=BUILD_TYPE;
-#else
-#include "winbuildinfo.h"
-#endif
 #endif
index 38d2747889afdbc0bb71beed7cbd3fb1679e374a..5641104ab158d7ed955a5b256505565c26418afc 100644 (file)
@@ -243,22 +243,12 @@ def buildinfo(lenv, build_type):
 
        obj = []
        if lenv['BF_BUILDINFO']:
-               if sys.platform=='win32':
-                       build_info_file = open("source/creator/winbuildinfo.h", 'w')
-                       build_info_file.write("char *build_date=\"%s\";\n"%build_date)
-                       build_info_file.write("char *build_time=\"%s\";\n"%build_time)
-                       build_info_file.write("char *build_rev=\"%s\";\n"%build_rev)
-                       build_info_file.write("char *build_platform=\"win32\";\n")
-                       build_info_file.write("char *build_type=\"dynamic\";\n")
-                       build_info_file.close()
-                       lenv.Append (CPPDEFINES = ['NAN_BUILDINFO', 'BUILD_DATE'])
-               else:
-                       lenv.Append (CPPDEFINES = ['BUILD_TIME=\'"%s"\''%(build_time),
-                                                                               'BUILD_DATE=\'"%s"\''%(build_date),
-                                                                               'BUILD_TYPE=\'"dynamic"\'',
-                                                                               'BUILD_REV=\'"%s"\''%(build_rev),
-                                                                               'NAN_BUILDINFO',
-                                                                               'BUILD_PLATFORM=\'"%s"\''%(sys.platform)])
+               lenv.Append (CPPDEFINES = ['BUILD_TIME=\'"%s"\''%(build_time),
+                                                                       'BUILD_DATE=\'"%s"\''%(build_date),
+                                                                       'BUILD_TYPE=\'"dynamic"\'',
+                                                                       'BUILD_REV=\'"%s"\''%(build_rev),
+                                                                       'NAN_BUILDINFO',
+                                                                       'BUILD_PLATFORM=\'"%s"\''%(sys.platform)])
                obj = [lenv.Object (root_build_dir+'source/creator/%s_buildinfo'%build_type,
                                                [root_build_dir+'source/creator/buildinfo.c'])]
        return obj