Fix mingw preprocessor define from cmake
This commit is contained in:
parent
3eeb4d05a9
commit
0de018f3be
|
@ -154,6 +154,9 @@ if (STEAM)
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSTEAM_BUILD")
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSTEAM_BUILD")
|
||||||
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DSTEAM_BUILD")
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DSTEAM_BUILD")
|
||||||
endif ()
|
endif ()
|
||||||
|
if (MINGW)
|
||||||
|
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DMINGW")
|
||||||
|
endif (MINGW)
|
||||||
if (NOT MSVC)
|
if (NOT MSVC)
|
||||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__FNAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D__FNAME__='\"$(subst ${CMAKE_SOURCE_DIR}/,,$(abspath $<))\"'")
|
||||||
else (NOT MSVC)
|
else (NOT MSVC)
|
||||||
|
|
|
@ -51,7 +51,7 @@ time_get_weekly_seed(void)
|
||||||
{
|
{
|
||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
|
|
||||||
#ifdef __MINGW32__ || __MINGW64__
|
#ifdef MINGW
|
||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
tm = gmtime(&now);
|
tm = gmtime(&now);
|
||||||
time_t lastMonday = get_last_monday(now, tm);
|
time_t lastMonday = get_last_monday(now, tm);
|
||||||
|
|
Loading…
Reference in New Issue