diff --git a/src/lime/CMakeLists.txt b/src/lime/CMakeLists.txt index 352fb4679..855c1ef7b 100644 --- a/src/lime/CMakeLists.txt +++ b/src/lime/CMakeLists.txt @@ -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() \ No newline at end of file diff --git a/src/lime_qt/CMakeLists.txt b/src/lime_qt/CMakeLists.txt index 85cd86a1a..4f46466ca 100644 --- a/src/lime_qt/CMakeLists.txt +++ b/src/lime_qt/CMakeLists.txt @@ -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)