diff --git a/CMakeLists.txt b/CMakeLists.txt index 9af0ba74..80e2c2fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,6 +265,9 @@ if (USE_SDL2) if (MSVC) list(APPEND DEPENDENCIES_COMPILE_OPTIONS "/DHAVE_LIBC") endif() + if (WIN32) + list(APPEND DEPENDENCIES_LIBRARIES SDL2main) + endif() message(STATUS "Using vendored SDL2") endif() else() diff --git a/src/main.cpp b/src/main.cpp index a16bce1c..7d797fcf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -613,7 +613,3 @@ int main(int argc, char** argv) { #endif return 0; } - -#ifdef _WIN32 -#include "winMain.cpp" -#endif