Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,12 @@ if(APPLE AND EMU_MACOS_STATIC_DEPS)
)
else()
# Dynamic linkage (Linux, Windows, or macOS with -DEMU_MACOS_STATIC_DEPS=OFF)
# SDL2main must come BEFORE SDL2: it references SDL symbols, and MinGW's ld
# is a single-pass linker. (Previously SDL2_image at the tail happened to
# re-pull the SDL symbols; removing it exposed the latent ordering bug.)
if(TARGET SDL2::SDL2main)
target_link_libraries(cardputer-emu PRIVATE SDL2::SDL2main)
endif()
if(TARGET SDL2::SDL2)
target_link_libraries(cardputer-emu PRIVATE SDL2::SDL2)
elseif(TARGET SDL2::SDL2-static)
Expand All @@ -312,9 +318,6 @@ else()
target_include_directories(cardputer-emu PRIVATE ${SDL2_INCLUDE_DIRS})
target_link_libraries(cardputer-emu PRIVATE ${SDL2_LIBRARIES})
endif()
if(TARGET SDL2::SDL2main)
target_link_libraries(cardputer-emu PRIVATE SDL2::SDL2main)
endif()
# Freetype (needed by LVGL)
if(FREETYPE_FOUND AND FREETYPE_LINK_LIBRARIES)
target_link_libraries(cardputer-emu PRIVATE ${FREETYPE_LINK_LIBRARIES})
Expand Down
Loading