Last active
June 30, 2024 18:38
-
-
Save optimalistel/dab127b58883b002a5ad to your computer and use it in GitHub Desktop.
CMake Hide console window in visual studio projects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-------------------------------------------------------------------- | |
# Hide the console window in visual studio projects | |
#-------------------------------------------------------------------- | |
if(MSVC) | |
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup") | |
endif() | |
#-------------------------------------------------------------------- | |
# Hide the console window in visual studio projects - Release | |
#-------------------------------------------------------------------- | |
if(MSVC) | |
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup") | |
endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!