Qt: Don't link against SDLMAIN, Qt already handles that. (#551)

This commit is contained in:
waddlesplash 2017-03-29 23:46:20 -04:00 committed by endrift
parent 874ad93f4d
commit 40f87518be
2 changed files with 8 additions and 1 deletions

View File

@ -22,7 +22,7 @@ if(BUILD_SDL)
if(SDL2_FOUND)
link_directories(${SDL2_LIBDIR})
endif()
list(APPEND PLATFORM_LIBRARY ${SDL_LIBRARY} ${SDLMAIN_LIBRARY})
list(APPEND PLATFORM_LIBRARY ${SDL_LIBRARY})
list(APPEND PLATFORM_SRC ${PLATFORM_SRC} ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-events.c ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-audio.c)
include_directories(${SDL_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/src/platform/sdl)
endif()

View File

@ -3,6 +3,10 @@
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// This must be defined before anything else is included.
#define SDL_MAIN_HANDLED
#include "GBAApp.h"
#include "Window.h"
@ -22,6 +26,9 @@ Q_IMPORT_PLUGIN(QWindowsAudioPlugin);
#endif
int main(int argc, char* argv[]) {
#ifdef BUILD_SDL
SDL_SetMainReady();
#endif
QGBA::GBAApp application(argc, argv);
QLocale locale = QLocale::system();