Skip to content

Commit 071750a

Browse files
committed
cmake: move _WIN32_WINNT definitions to root
1 parent fb0730f commit 071750a

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,11 @@ ELSE ()
263263
ENDIF ()
264264
ENDIF()
265265

266+
# Ensure that MinGW provides the correct header files.
267+
IF (WIN32 AND NOT CYGWIN)
268+
ADD_DEFINITIONS(-DWIN32 -D_WIN32_WINNT=0x0600)
269+
ENDIF()
270+
266271
IF( NOT CMAKE_CONFIGURATION_TYPES )
267272
# Build Debug by default
268273
IF (NOT CMAKE_BUILD_TYPE)

fuzzers/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
# Ensure that MinGW provides the correct header files.
2-
IF (WIN32 AND NOT CYGWIN)
3-
ADD_DEFINITIONS(-DWIN32 -D_WIN32_WINNT=0x0600)
4-
ENDIF()
5-
61
LINK_DIRECTORIES(${LIBGIT2_LIBDIRS})
72
INCLUDE_DIRECTORIES(${LIBGIT2_INCLUDES})
83
INCLUDE_DIRECTORIES(SYSTEM ${LIBGIT2_SYSTEM_INCLUDES})

src/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,6 @@ FILE(GLOB SRC_H
299299

300300
# On Windows use specific platform sources
301301
IF (WIN32 AND NOT CYGWIN)
302-
ADD_DEFINITIONS(-DWIN32 -D_WIN32_WINNT=0x0600)
303-
304302
IF(MSVC)
305303
SET(WIN_RC "win32/git2.rc")
306304
ENDIF()

tests/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64)
1414
# Ensure that we do not use deprecated functions internally
1515
ADD_DEFINITIONS(-DGIT_DEPRECATE_HARD)
1616

17-
# Ensure that MinGW provides the correct header files.
18-
IF (WIN32 AND NOT CYGWIN)
19-
ADD_DEFINITIONS(-DWIN32 -D_WIN32_WINNT=0x0600)
20-
ENDIF()
21-
2217
INCLUDE_DIRECTORIES(${CLAR_PATH} ${libgit2_BINARY_DIR}/src)
2318
FILE(GLOB_RECURSE SRC_TEST ${CLAR_PATH}/*/*.c ${CLAR_PATH}/*/*.h)
2419
SET(SRC_CLAR "main.c" "clar_libgit2.c" "clar_libgit2_trace.c" "clar_libgit2_timer.c" "clar.c")

0 commit comments

Comments
 (0)