diff --git a/cmake/wrap_standalone.cmake b/cmake/wrap_standalone.cmake index 66870607..0009a1c4 100644 --- a/cmake/wrap_standalone.cmake +++ b/cmake/wrap_standalone.cmake @@ -137,16 +137,19 @@ function(target_add_standalone_wrapper) ) endif() - target_link_options( + if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + target_link_options( ${SA_TARGET} PRIVATE - $<$: /entry:mainCRTStartup - > - $<$: + ) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + target_link_options( + ${SA_TARGET} + PRIVATE -Wl,/entry:mainCRTStartup - > ) + endif() elseif(UNIX) target_sources(${SA_TARGET} PRIVATE