Patch #27225: blenderplayer resource compilation error fix for cmake + mingw,
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 6 May 2011 08:16:44 +0000 (08:16 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 6 May 2011 08:16:44 +0000 (08:16 +0000)
patch by Ryakiotakis Antonis.

source/blenderplayer/CMakeLists.txt

index 1f796e86693a713f2b6ced0187608461b3aacb55..83dfd15f2ddbcc77d935eddd54dd86ae9db93195 100644 (file)
@@ -43,13 +43,25 @@ if(WIN32 AND NOT UNIX)
        string(SUBSTRING ${BLENDER_VERSION} 0 1 bver1)
        string(SUBSTRING ${BLENDER_VERSION} 2 1 bver2)
        string(SUBSTRING ${BLENDER_VERSION} 3 1 bver3)
-       add_definitions(
-               -DBLEN_VER_RC_STR=${BLENDER_VERSION}
-               -DBLEN_VER_RC_1=${bver1}
-               -DBLEN_VER_RC_2=${bver2}
-               -DBLEN_VER_RC_3=${bver3}
-               -DBLEN_VER_RC_4=0
-       )
+       if(MINGW)
+               add_definitions(
+                       -DWINDRES
+                       -DBLEN_VER_RC_STR_M=${BLENDER_VERSION}
+                       -DBLEN_VER_RC_1=${bver1}
+                       -DBLEN_VER_RC_2=${bver2}
+                       -DBLEN_VER_RC_3=${bver3}
+                       -DBLEN_VER_RC_4=0
+               )
+       else()
+               add_definitions(
+                       -DBLEN_VER_RC_STR=${BLENDER_VERSION}
+                       -DBLEN_VER_RC_1=${bver1}
+                       -DBLEN_VER_RC_2=${bver2}
+                       -DBLEN_VER_RC_3=${bver3}
+                       -DBLEN_VER_RC_4=0
+               )
+       endif()
+
        add_executable(blenderplayer ${EXETYPE} ${CMAKE_CURRENT_BINARY_DIR}/dna.c ../icons/winblender.rc)
 else()
        add_executable(blenderplayer ${CMAKE_CURRENT_BINARY_DIR}/dna.c)