diff options
author | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-09-01 19:08:32 +0400 |
---|---|---|
committer | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-09-01 19:08:32 +0400 |
commit | 981f7fcd0d315abb425bf34dd37f7cd4d9e8d55e (patch) | |
tree | 70800c93ec1a12579c32874e2a72eaf3290eba8e /source/creator | |
parent | 5b91a783cf0ec132398a2767d3419d675e5126b5 (diff) | |
parent | 2365c64014b3e067bb212b2061f1d14c1f944090 (diff) |
merge with trunk r39834
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/CMakeLists.txt | 14 | ||||
-rw-r--r-- | source/creator/buildinfo.c | 24 | ||||
-rw-r--r-- | source/creator/creator.c | 30 |
3 files changed, 18 insertions, 50 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 43f012b9543..c76c944b32c 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -25,9 +25,6 @@ # # ***** END GPL LICENSE BLOCK ***** -# So BUILDINFO and BLENDERPATH strings are automatically quoted -cmake_policy(SET CMP0005 NEW) - setup_libdirs() blender_include_dirs( @@ -136,6 +133,7 @@ if(WIN32 AND NOT UNIX) endif() if(WITH_BUILDINFO) + add_definitions(-DWITH_BUILDINFO) # -------------------------------------------------------------------------- # These defines could all be moved into the header below string(REPLACE " " "\ " BUILDINFO_CFLAGS "${CMAKE_C_FLAGS}") @@ -553,11 +551,11 @@ elseif(WIN32) if(WITH_CODEC_FFMPEG) install( FILES - ${LIBDIR}/ffmpeg/lib/avcodec-52.dll - ${LIBDIR}/ffmpeg/lib/avformat-52.dll - ${LIBDIR}/ffmpeg/lib/avdevice-52.dll - ${LIBDIR}/ffmpeg/lib/avutil-50.dll - ${LIBDIR}/ffmpeg/lib/swscale-0.dll + ${LIBDIR}/ffmpeg/lib/avcodec-53.dll + ${LIBDIR}/ffmpeg/lib/avformat-53.dll + ${LIBDIR}/ffmpeg/lib/avdevice-53.dll + ${LIBDIR}/ffmpeg/lib/avutil-51.dll + ${LIBDIR}/ffmpeg/lib/swscale-2.dll DESTINATION ${TARGETDIR} ) diff --git a/source/creator/buildinfo.c b/source/creator/buildinfo.c index 48a4352b11b..3853d6ca693 100644 --- a/source/creator/buildinfo.c +++ b/source/creator/buildinfo.c @@ -33,28 +33,24 @@ #ifdef WITH_BUILDINFO_HEADER -#include "buildinfo.h" +# include "buildinfo.h" #endif #ifdef BUILD_DATE -/* copied from BLI_utildefines.h */ -#define STRINGIFY_ARG(x) #x -#define STRINGIFY(x) STRINGIFY_ARG(x) - /* currently only these are defined in the header */ -char build_date[]= STRINGIFY(BUILD_DATE); -char build_time[]= STRINGIFY(BUILD_TIME); -char build_rev[]= STRINGIFY(BUILD_REV); +char build_date[]= BUILD_DATE; +char build_time[]= BUILD_TIME; +char build_rev[]= BUILD_REV; -char build_platform[]= STRINGIFY(BUILD_PLATFORM); -char build_type[]= STRINGIFY(BUILD_TYPE); +char build_platform[]= BUILD_PLATFORM; +char build_type[]= BUILD_TYPE; #ifdef BUILD_CFLAGS -char build_cflags[]= STRINGIFY(BUILD_CFLAGS); -char build_cxxflags[]= STRINGIFY(BUILD_CXXFLAGS); -char build_linkflags[]= STRINGIFY(BUILD_LINKFLAGS); -char build_system[]= STRINGIFY(BUILD_SYSTEM); +char build_cflags[]= BUILD_CFLAGS; +char build_cxxflags[]= BUILD_CXXFLAGS; +char build_linkflags[]= BUILD_LINKFLAGS; +char build_system[]= BUILD_SYSTEM; #else char build_cflags[]= "unmaintained buildsystem alert!"; char build_cxxflags[]= "unmaintained buildsystem alert!"; diff --git a/source/creator/creator.c b/source/creator/creator.c index 36209dbda78..9b2cfb08382 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -182,20 +182,6 @@ static void blender_esc(int sig) } #endif -/* buildinfo can have quotes */ -#ifdef BUILD_DATE -static void strip_quotes(char *str) -{ - if(str[0] == '"') { - int len= strlen(str) - 1; - memmove(str, str+1, len); - if(str[len-1] == '"') { - str[len-1]= '\0'; - } - } -} -#endif - static int print_version(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) { printf (BLEND_VERSION_STRING_FMT); @@ -369,9 +355,9 @@ static int debug_mode(int UNUSED(argc), const char **UNUSED(argv), void *data) printf(BLEND_VERSION_STRING_FMT); MEM_set_memory_debug(); -#ifdef NAN_BUILDINFO +#ifdef WITH_BUILDINFO printf("Build: %s %s %s %s\n", build_date, build_time, build_platform, build_type); -#endif // NAN_BUILDINFO +#endif // WITH_BUILDINFO BLI_argsPrint(data); return 0; @@ -1181,18 +1167,6 @@ int main(int argc, const char **argv) // need this. BLI_where_am_i(bprogname, sizeof(bprogname), argv[0]); - -#ifdef BUILD_DATE - strip_quotes(build_date); - strip_quotes(build_time); - strip_quotes(build_rev); - strip_quotes(build_platform); - strip_quotes(build_type); - strip_quotes(build_cflags); - strip_quotes(build_cxxflags); - strip_quotes(build_linkflags); - strip_quotes(build_system); -#endif BLI_threadapi_init(); |