diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake index 966f00bb..bf47c2f0 100644 --- a/cmake/FindSDL2.cmake +++ b/cmake/FindSDL2.cmake @@ -158,7 +158,7 @@ ENDIF(MINGW) IF(SDL2_LIBRARY_TEMP) # For SDL2main - if(SDL2MAIN_LIBRARY AND NOT MSVC) + if(SDL2MAIN_LIBRARY AND NOT WIN32) SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP}) endif() diff --git a/src/wx/CMakeLists.txt b/src/wx/CMakeLists.txt index 9e15ebdc..d17d2f5c 100644 --- a/src/wx/CMakeLists.txt +++ b/src/wx/CMakeLists.txt @@ -992,15 +992,15 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif() elseif(MSVC) # the debug lib libcmtd is linked in debug mode, so don't link the normal version - # also make the app a console app in debug mode set_target_properties(visualboyadvance-m PROPERTIES LINK_FLAGS_DEBUG "/nodefaultlib:libcmt /subsystem:console") - - if(CMAKE_BUILD_TYPE MATCHES Debug) - # to get the debug console mode app to work correctly - target_compile_definitions(visualboyadvance-m PRIVATE -DWIN32_CONSOLE_APP) - endif() endif() +# Make the app a console app in debug mode to get log messages. +if(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug) + target_compile_definitions(visualboyadvance-m PRIVATE -DWIN32_CONSOLE_APP) +endif() + + if(NOT WIN32 AND NOT APPLE) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/visualboyadvance-m.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/visualboyadvance-m.appdata.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/share/appdata)