Skip to content

Commit dc1deb3

Browse files
Alexander OvchinnikovAlexander Ovchinnikov
authored andcommitted
Use __GNUC__ macro in the resource script
Fix the default LIBGIT2_FILENAME for GNU windres
1 parent 7100044 commit dc1deb3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,6 @@ list(SORT SRC_H)
278278

279279
# On Windows use specific platform sources
280280
if(WIN32 AND NOT CYGWIN)
281-
if(NOT MSVC)
282-
ADD_DEFINITIONS(-DGCC_WINDRES)
283-
endif()
284-
285281
SET(WIN_RC "win32/git2.rc")
286282

287283
file(GLOB SRC_OS win32/*.c win32/*.h)

src/win32/git2.rc

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@
22
#include "../../include/git2/version.h"
33

44
#ifndef LIBGIT2_FILENAME
5-
# define LIBGIT2_FILENAME "git2"
5+
# ifdef __GNUC__
6+
# define LIBGIT2_FILENAME git2
7+
# else
8+
# define LIBGIT2_FILENAME "git2"
9+
# endif
610
#endif
711

812
#ifndef LIBGIT2_COMMENTS
913
# define LIBGIT2_COMMENTS "For more information visit http://libgit2.github.com/"
1014
#endif
1115

12-
#ifdef GCC_WINDRES
16+
#ifdef __GNUC__
1317
# define _STR(x) #x
1418
# define STR(x) _STR(x)
1519
#else
1620
# define STR(x) x
1721
#endif
1822

19-
#ifdef GCC_WINDRES
23+
#ifdef __GNUC__
2024
VS_VERSION_INFO VERSIONINFO
2125
#else
2226
VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE

0 commit comments

Comments
 (0)