File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -726,7 +726,13 @@ if(WIN32)
726
726
endif ()
727
727
728
728
add_executable (headless-git ${CMAKE_SOURCE_DIR} /compat/win32/headless.c )
729
- target_link_options (headless-git PUBLIC /NOLOGO /ENTRY:wWinMainCRTStartup /SUBSYSTEM:WINDOWS )
729
+ if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang" )
730
+ target_link_options (headless-git PUBLIC -municode -Wl,-subsystem,windows )
731
+ elseif (CMAKE_C_COMPILER_ID STREQUAL "MSVC" )
732
+ target_link_options (headless-git PUBLIC /NOLOGO /ENTRY:wWinMainCRTStartup /SUBSYSTEM:WINDOWS )
733
+ else ()
734
+ message (FATAL_ERROR "Unhandled compiler: ${CMAKE_C_COMPILER_ID} " )
735
+ endif ()
730
736
elseif (UNIX )
731
737
target_link_libraries (common-main pthread rt )
732
738
endif ()
You can’t perform that action at this time.
0 commit comments