Skip to content
Snippets Groups Projects
Commit ca1dfac9 authored by Stephen Hurd's avatar Stephen Hurd
Browse files

Smore more Win32 fixes

Sketchiest thing is using _mkgmtime32 instead of _mkgmtime...
This is aliased on Vista or above, but apparently we're not targeting that?
parent 84168c9b
No related branches found
No related tags found
No related merge requests found
...@@ -53,14 +53,16 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") ...@@ -53,14 +53,16 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows")
endif() endif()
if(X11_FOUND) if(X11_FOUND)
list(APPEND SOURCE x_events.c x_cio.c scale.c) list(APPEND SOURCE x_events.c x_cio.c)
set(NEED_BITMAP TRUE) set(NEED_BITMAP TRUE)
set(NEED_DLOPEN TRUE) set(NEED_DLOPEN TRUE)
set(NEED_SCALE TRUE)
endif() endif()
if(SDL2_FOUND) if(SDL2_INCLUDE_DIRS)
list(APPEND SOURCE sdl_con.c) list(APPEND SOURCE sdl_con.c)
list(APPEND SOURCE sdlfuncs.c) list(APPEND SOURCE sdlfuncs.c)
set(NEED_SCALE TRUE)
if(WIN32) if(WIN32)
list(APPEND SOURCE SDL_win32_main.c) list(APPEND SOURCE SDL_win32_main.c)
endif() endif()
...@@ -75,6 +77,10 @@ if(NEED_BITMAP) ...@@ -75,6 +77,10 @@ if(NEED_BITMAP)
list(APPEND SOURCE bitmap_con.c) list(APPEND SOURCE bitmap_con.c)
endif() endif()
if(NEED_SCALE)
list(APPEND SOURCE scale.c)
endif()
add_library(ciolib OBJECT ${SOURCE}) add_library(ciolib OBJECT ${SOURCE})
target_include_directories(ciolib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(ciolib PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
...@@ -84,8 +90,8 @@ else() ...@@ -84,8 +90,8 @@ else()
target_compile_definitions(ciolib PRIVATE NO_X) target_compile_definitions(ciolib PRIVATE NO_X)
endif() endif()
if(SDL2_FOUND) if(SDL2_INCLUDE_DIRS)
target_include_directories(ciolib PRIVATE ${SDL2_INCLUDE_DIRS}) target_include_directories(ciolib PUBLIC ${SDL2_INCLUDE_DIRS})
set(WITH_SDL TRUE PARENT_SCOPE) set(WITH_SDL TRUE PARENT_SCOPE)
endif() endif()
......
...@@ -114,6 +114,7 @@ struct tm* localtime32(const time32_t* t32, struct tm* tm) ...@@ -114,6 +114,7 @@ struct tm* localtime32(const time32_t* t32, struct tm* tm)
#if defined(_WIN32) #if defined(_WIN32)
#include <windows.h> /* SYSTEMTIME and GetLocalTime() */ #include <windows.h> /* SYSTEMTIME and GetLocalTime() */
#include <time.h> /* _mkgmtime */
#else #else
#include <sys/time.h> /* stuct timeval, gettimeofday() */ #include <sys/time.h> /* stuct timeval, gettimeofday() */
#endif #endif
......
...@@ -57,7 +57,7 @@ DLLEXPORT struct tm* localtime32(const time32_t* t, struct tm* tm); ...@@ -57,7 +57,7 @@ DLLEXPORT struct tm* localtime32(const time32_t* t, struct tm* tm);
/* Microsoft's equivalent of GLIBC/BSD timegm() */ /* Microsoft's equivalent of GLIBC/BSD timegm() */
#if defined(_MSC_VER) || defined(__MINGW32__) #if defined(_MSC_VER) || defined(__MINGW32__)
#define timegm _mkgmtime #define timegm _mkgmtime32
#endif #endif
/***********************************/ /***********************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment