mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix build if USE_GDB_STUB is disabled
This commit is contained in:
parent
8ea97f0047
commit
a66fa48aa5
|
@ -3,6 +3,8 @@ enable_language(CXX)
|
|||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
|
||||
|
||||
set(PLATFORM_SRC)
|
||||
|
||||
if(BUILD_SDL)
|
||||
if(NOT SDL_FOUND AND NOT SDL2_FOUND)
|
||||
find_package(SDL 1.2 REQUIRED)
|
||||
|
@ -10,8 +12,8 @@ if(BUILD_SDL)
|
|||
if(SDL2_FOUND)
|
||||
link_directories(${SDL2_LIBDIR})
|
||||
endif()
|
||||
set(PLATFORM_LIBRARY "${PLATFORM_LIBRARY};${SDL_LIBRARY};${SDLMAIN_LIBRARY}")
|
||||
set(PLATFORM_SRC ${PLATFORM_SRC} ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-events.c ${CMAKE_SOURCE_DIR}/src/platform/sdl/sdl-audio.c)
|
||||
list(APPEND PLATFORM_LIBRARY ${SDL_LIBRARY} ${SDLMAIN_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()
|
||||
|
||||
|
@ -68,7 +70,7 @@ else()
|
|||
endif()
|
||||
|
||||
if(USE_GDB_STUB)
|
||||
set(SOURCE_FILES ${PLATFORM_SRC} ${SOURCE_FILES} GDBController.cpp GDBWindow.cpp)
|
||||
list(APPEND PLATFORM_SRC GDBController.cpp GDBWindow.cpp)
|
||||
endif()
|
||||
set(MACOSX_BUNDLE_ICON_FILE mgba.icns)
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION ${LIB_VERSION_STRING})
|
||||
|
@ -80,7 +82,7 @@ qt5_add_resources(RESOURCES resources.qrc)
|
|||
if(WIN32)
|
||||
list(APPEND RESOURCES ${CMAKE_SOURCE_DIR}/res/mgba.rc)
|
||||
endif()
|
||||
add_executable(${BINARY_NAME}-qt WIN32 MACOSX_BUNDLE main.cpp ${CMAKE_SOURCE_DIR}/res/mgba.icns ${SOURCE_FILES} ${UI_FILES} ${RESOURCES})
|
||||
add_executable(${BINARY_NAME}-qt WIN32 MACOSX_BUNDLE main.cpp ${CMAKE_SOURCE_DIR}/res/mgba.icns ${SOURCE_FILES} ${PLATFORM_SRC} ${UI_FILES} ${RESOURCES})
|
||||
set_target_properties(${BINARY_NAME}-qt PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_SOURCE_DIR}/res/info.plist.in)
|
||||
|
||||
set(QT_LIBRARIES Qt5::Widgets Qt5::OpenGL)
|
||||
|
|
|
@ -100,6 +100,7 @@ GameController::~GameController() {
|
|||
delete[] m_drawContext;
|
||||
}
|
||||
|
||||
#ifdef USE_GDB_STUB
|
||||
ARMDebugger* GameController::debugger() {
|
||||
return m_threadContext.debugger;
|
||||
}
|
||||
|
@ -116,6 +117,7 @@ void GameController::setDebugger(ARMDebugger* debugger) {
|
|||
}
|
||||
setPaused(wasPaused);
|
||||
}
|
||||
#endif
|
||||
|
||||
void GameController::loadGame(const QString& path, bool dirmode) {
|
||||
closeGame();
|
||||
|
|
Loading…
Reference in New Issue