From 6e1504d7a515000a24c95ce01be1f2db860330c0 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Tue, 29 Sep 2015 22:39:08 +0200 Subject: [PATCH] Further cleanup USE_SDL_MAIN --- CMakeLists.txt | 3 --- cmake/msys.cmake | 1 - src/app/main.cpp | 2 +- src/common/config.h.cmake | 2 -- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 501982cc..a45ae6d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,8 +94,6 @@ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") # Platform-dependent implementation of system.h set(SYSTEM_CPP_MODULE "system_macosx.cpp") - - set(USE_SDL_MAIN 1) # fixes SDL_main else() message(STATUS "Build for other system") set(PLATFORM_WINDOWS 0) @@ -291,7 +289,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") message(STATUS "Adding MSVC-specific options") set(CBOT_STATIC 1) # only this works for some reason - set(USE_SDL_MAIN 1) # fixes SDL_main set(WINGETOPT 1) # use wingetopt library endif() diff --git a/cmake/msys.cmake b/cmake/msys.cmake index 230ceb63..8a622335 100644 --- a/cmake/msys.cmake +++ b/cmake/msys.cmake @@ -7,5 +7,4 @@ if (MSYS AND (NOT MXE)) set(PLATFORM_OTHER 0) set(COLOBOT_CXX_FLAGS "${COLOBOT_CXX_FLAGS} -U__STRICT_ANSI__") # fixes putenv() - set(USE_SDL_MAIN 1) # fixes SDL_main endif() diff --git a/src/app/main.cpp b/src/app/main.cpp index cf0283ca..0845d5ad 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -89,7 +89,7 @@ The current layout is the following: extern "C" { -int SDL_MAIN_FUNC(int argc, char *argv[]) +int main(int argc, char *argv[]) { CLogger logger; // single instance of logger diff --git a/src/common/config.h.cmake b/src/common/config.h.cmake index a4bc9f22..b4767724 100644 --- a/src/common/config.h.cmake +++ b/src/common/config.h.cmake @@ -16,8 +16,6 @@ #cmakedefine OPENAL_SOUND -#define SDL_MAIN_FUNC main - #cmakedefine PORTABLE @PORTABLE@ #define COLOBOT_DEFAULT_DATADIR "@COLOBOT_INSTALL_DATA_DIR@"