]> git.jsancho.org Git - lugaru.git/blobdiff - CMakeLists.txt
Added in 'stdint.h' and 'inttypes.h' files, since MSVC isn't C99 compliant
[lugaru.git] / CMakeLists.txt
index 7cb9cefffb30dbf7cc7cec516475650ade3da2b6..d524e8ccb4c191df4ec38b6eea6e0fdb411baa02 100644 (file)
@@ -70,6 +70,14 @@ if(UNIX)
        )
 endif(UNIX)
 
+if(MSVC) # MSVC non-C99 support biting us hard
+       set(LUGARU_H
+               ${LUGARU_H}
+               ${DEPDIR}/msinttypes/stdint.h
+               ${DEPDIR}/msinttypes/inttypes.h
+       )
+endif(MSVC)
+
 set(LUGARU_H
        ${SRCDIR}/Constants.h
        ${SRCDIR}/Frustum.h
@@ -115,6 +123,16 @@ if(WIN32)
                                                  )
   endif(CMAKE_CROSSCOMPILING)
   if(NOT CMAKE_CROSSCOMPILING)
+   if(MSVC)
+    ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
+                                                 COMMAND rc
+                                                         -I${SRCDIR}/res
+                                                         -fo${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
+                                                         ${SRCDIR}/res/Lugaru.rc
+                                             DEPENDS ${SRCDIR}/res/Lugaru.rc
+                                                 )
+   endif(MSVC)
+   if(MINGW)
     ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/lugaru_resource.obj
                                                  COMMAND windres
                                                          -I${SRCDIR}/res
@@ -122,6 +140,7 @@ if(WIN32)
                                                          -i${SRCDIR}/res/Lugaru.rc
                                              DEPENDS ${SRCDIR}/res/Lugaru.rc
                                                  )
+   endif(MINGW)
   endif(NOT CMAKE_CROSSCOMPILING)
 
   # !!! FIXME: get rid of this.