Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cmake: only add -Wl,--undefined=WinMain when building an executable
(cherry-picked from commit 653e433)
  • Loading branch information
madebr authored and sezero committed Sep 27, 2022
1 parent 0f2503c commit c7950bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdl2-config.cmake.in
Expand Up @@ -80,12 +80,12 @@ if(EXISTS "${_sdl2main_library}")
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
set_target_properties(SDL2::SDL2main
PROPERTIES
INTERFACE_LINK_OPTIONS "-Wl,--undefined=_WinMain@16"
INTERFACE_LINK_OPTIONS "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--undefined=_WinMain@16>"
)
else()
set_target_properties(SDL2::SDL2main
PROPERTIES
INTERFACE_LINK_OPTIONS "-Wl,--undefined=WinMain"
INTERFACE_LINK_OPTIONS "$<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>:-Wl,--undefined=WinMain>"
)
endif()
endif()
Expand Down

0 comments on commit c7950bf

Please sign in to comment.