lime: Executable now compiles as a GUI application on Windows

This commit is contained in:
OpenSauce04 2024-10-24 16:07:21 -07:00
parent 9697485039
commit 4711448719
2 changed files with 10 additions and 7 deletions

View File

@ -27,3 +27,12 @@ endif()
if (ENABLE_QT AND USE_DISCORD_PRESENCE)
target_link_libraries(lime PRIVATE discord-rpc)
endif()
if(WIN32)
# compile as a win32 gui application instead of a console application
if(MSVC)
set_target_properties(lime PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
elseif(MINGW)
set_target_properties(lime PROPERTIES LINK_FLAGS_RELEASE "-mwindows")
endif()
endif()

View File

@ -272,14 +272,8 @@ if (APPLE)
MACOSX_BUNDLE_ICON_FILE "lime.icns"
RESOURCE "${APPLE_RESOURCES}"
)
elseif(WIN32)
# compile as a win32 gui application instead of a console application
elseif (WIN32)
target_link_libraries(lime_qt PRIVATE Qt6::EntryPointImplementation)
if(MSVC)
set_target_properties(lime_qt PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
elseif(MINGW)
set_target_properties(lime_qt PROPERTIES LINK_FLAGS_RELEASE "-mwindows")
endif()
endif()
if(ENABLE_SDL2)