Fix mingw preprocessor define from cmake

This commit is contained in:
Linus Probert 2019-02-24 22:42:51 +01:00
parent 3eeb4d05a9
commit 0de018f3be
2 changed files with 4 additions and 1 deletions

View File

@ -154,6 +154,9 @@ if (STEAM)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSTEAM_BUILD")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DSTEAM_BUILD")
endif ()
if (MINGW)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DMINGW")
endif (MINGW)
if (NOT MSVC)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__FNAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
else (NOT MSVC)

View File

@ -51,7 +51,7 @@ time_get_weekly_seed(void)
{
time_t now = time(NULL);
#ifdef __MINGW32__ || __MINGW64__
#ifdef MINGW
struct tm *tm;
tm = gmtime(&now);
time_t lastMonday = get_last_monday(now, tm);