This is sophiscated feature should be done step by step. when detect a link option like /SUBSYSTEM:WINDOWS, currently what we do is
if(MSVC)
target_link_options(${PROJECT_NAME} PRIVATE /SUBSYSTEM:WINDOWS)
endif()
We can add more support like this
if(MSVC)
#support for msvc and clang-cl(clang(MSVC CLI) for msvc)
target_link_options(${PROJECT_NAME} PRIVATE /SUBSYSTEM:WINDOWS)
elseif(CMAKE_COMPILER_IS_GNUCXX)
#support for mingw and clang for mingw
#mght loss for -municode for winmain
target_link_options(${PROJECT_NAME} PRIVATE -mwindows)
else()
#support for clang(GNU CLI) for msvc
#might loss for link "libcmt" "libcmtd" "libcmt.amd64" "libcmtd.amd64"
target_link_options(${PROJECT_NAME} PRIVATE -Xlinker /SUBSYSTEM:WINDOWS)
endif()
looks like mingw and
This is sophiscated feature should be done step by step. when detect a link option like
/SUBSYSTEM:WINDOWS, currently what we do isWe can add more support like this
looks like mingw and