Skip to content

Commit

Permalink
Fix CXX_COMPILER_FRONTEND_VARIANT not working
Browse files Browse the repository at this point in the history
  • Loading branch information
mthierman committed Aug 13, 2024
1 parent a68012c commit f9c929d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions cmake/wrap_standalone.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
$<$<CXX_COMPILER_FRONTEND_VARIANT:MSVC>:
/entry:mainCRTStartup
>
$<$<CXX_COMPILER_FRONTEND_VARIANT:GNU>:
)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_link_options(
${SA_TARGET}
PRIVATE
-Wl,/entry:mainCRTStartup
>
)
endif()

elseif(UNIX)
target_sources(${SA_TARGET} PRIVATE
Expand Down

0 comments on commit f9c929d

Please sign in to comment.