Use __GNUC__ macro in the resource script

Fix the default LIBGIT2_FILENAME for GNU windres
parent 71000441
...@@ -278,10 +278,6 @@ list(SORT SRC_H) ...@@ -278,10 +278,6 @@ list(SORT SRC_H)
# On Windows use specific platform sources # On Windows use specific platform sources
if(WIN32 AND NOT CYGWIN) if(WIN32 AND NOT CYGWIN)
if(NOT MSVC)
ADD_DEFINITIONS(-DGCC_WINDRES)
endif()
SET(WIN_RC "win32/git2.rc") SET(WIN_RC "win32/git2.rc")
file(GLOB SRC_OS win32/*.c win32/*.h) file(GLOB SRC_OS win32/*.c win32/*.h)
......
...@@ -2,21 +2,25 @@ ...@@ -2,21 +2,25 @@
#include "../../include/git2/version.h" #include "../../include/git2/version.h"
#ifndef LIBGIT2_FILENAME #ifndef LIBGIT2_FILENAME
# ifdef __GNUC__
# define LIBGIT2_FILENAME git2
# else
# define LIBGIT2_FILENAME "git2" # define LIBGIT2_FILENAME "git2"
# endif
#endif #endif
#ifndef LIBGIT2_COMMENTS #ifndef LIBGIT2_COMMENTS
# define LIBGIT2_COMMENTS "For more information visit http://libgit2.github.com/" # define LIBGIT2_COMMENTS "For more information visit http://libgit2.github.com/"
#endif #endif
#ifdef GCC_WINDRES #ifdef __GNUC__
# define _STR(x) #x # define _STR(x) #x
# define STR(x) _STR(x) # define STR(x) _STR(x)
#else #else
# define STR(x) x # define STR(x) x
#endif #endif
#ifdef GCC_WINDRES #ifdef __GNUC__
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
#else #else
VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment