Skip to content

Commit

Permalink
Windows standalone: _SILENCE_CLANG_COROUTINE_MESSAGE for Clang 17. Do…
Browse files Browse the repository at this point in the history
…n't leak WIN32_LEAN_AND_MEAN downstream. Fix ClangCL entry point. (#308)
  • Loading branch information
mthierman authored Sep 21, 2024
1 parent cd3cac0 commit bdd7b86
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions cmake/wrap_standalone.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -119,22 +119,28 @@ function(target_add_standalone_wrapper)
)

target_compile_definitions(${salib} PUBLIC
NOMINMAX
WIN32_LEAN_AND_MEAN
CLAP_WRAPPER_HAS_WIN32
)

target_compile_definitions(${salib} PUBLIC
NOMINMAX
)

set_target_properties(${SA_TARGET} PROPERTIES
WIN32_EXECUTABLE TRUE
)

if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_definitions(${SA_TARGET} PRIVATE _SILENCE_CLANG_COROUTINE_MESSAGE)
endif()

if(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "MSVC")
target_link_options(
${SA_TARGET}
PRIVATE
/entry:mainCRTStartup
)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
elseif(CMAKE_CXX_COMPILER_FRONTEND_VARIANT STREQUAL "GNU")
target_link_options(
${SA_TARGET}
PRIVATE
Expand Down

0 comments on commit bdd7b86

Please sign in to comment.