From 42aa1cbe86b0227b8d86a733ff0cfd555b2fa30f Mon Sep 17 00:00:00 2001 From: Linus Probert Date: Thu, 21 Dec 2017 11:57:12 +0100 Subject: [PATCH] Fixed some mingw warnings. --- .appveyor.yml | 2 +- CMakeLists.txt | 14 +++++++------- src/map.c | 1 + src/map_lua.c | 1 + src/timer.c | 1 + 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 184fcb0..3d16be3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -64,4 +64,4 @@ build_script: cmake -DCMAKE_PREFIX_PATH="%PREFIX%" -DCMAKE_C_COMPILER=mingw32-gcc.exe -DCMAKE_MAKE_PROGRAM=mingw32-make.exe -DCMAKE_VERBOSE_MAKEFILE=ON -G "MinGW Makefiles" - |- - mingw32-make + mingw32-make breakhack diff --git a/CMakeLists.txt b/CMakeLists.txt index 95871e4..95b9aaf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,16 +9,16 @@ include(cmake/FindSDL2.cmake) include(cmake/FindSDL2_image.cmake) include(cmake/FindSDL2_ttf.cmake) -configure_file( - "${PROJECT_SOURCE_DIR}/src/config.h.in" - "${PROJECT_BINARY_DIR}/config.h" - ) - if (NOT WIN32) include(FindX11) include(cmake/FindCheck.cmake) endif (NOT WIN32) +configure_file( + "${PROJECT_SOURCE_DIR}/src/config.h.in" + "${PROJECT_BINARY_DIR}/config.h" + ) + include_directories( ${PROJECT_BINARY_DIR} ${LUA_INCLUDE_DIR} @@ -74,7 +74,7 @@ if (NOT WIN32) endif (NOT WIN32) # TESTS: -IF (CHECK_FOUND) +IF (CHECK_FOUND AND NOT WIN32) find_package(Threads REQUIRED) enable_testing() add_executable(test_util test/check_util src/util) @@ -88,4 +88,4 @@ IF (CHECK_FOUND) add_executable(test_hashtable test/check_hashtable src/hashtable) target_link_libraries(test_hashtable ${CHECK_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) add_test(test_hashtable test_hashtable) -ENDIF (CHECK_FOUND) +ENDIF (CHECK_FOUND AND NOT WIN32) diff --git a/src/map.c b/src/map.c index 0cffd4e..59b39aa 100644 --- a/src/map.c +++ b/src/map.c @@ -1,3 +1,4 @@ +#include #include "map.h" #include "map_lua.h" #include "util.h" diff --git a/src/map_lua.c b/src/map_lua.c index 13d5262..064dd0a 100644 --- a/src/map_lua.c +++ b/src/map_lua.c @@ -1,4 +1,5 @@ #include +#include #include #include diff --git a/src/timer.c b/src/timer.c index d3ab744..ef4bcaf 100644 --- a/src/timer.c +++ b/src/timer.c @@ -1,4 +1,5 @@ #include +#include #include "util.h" #include "timer.h"