From 9618b4ad3b6977c8073ccbcff8118018caccc442 Mon Sep 17 00:00:00 2001 From: Vito Gamberini Date: Wed, 21 Jun 2023 18:43:51 -0400 Subject: [PATCH] Build: Link sdl2main when available --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2e453d3e..2fe699fb4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,7 @@ if (SDL_SHARED OR SDL_STATIC) list(APPEND CEN_TARGETS centurion) target_link_libraries(centurion INTERFACE centurion-headers-only + $<$:SDL2::SDL2main> $,SDL2::SDL2,SDL2::SDL2-static> $,SDL2_image::SDL2_image,SDL2_image::SDL2_image-static> $,SDL2_mixer::SDL2_mixer,SDL2_mixer::SDL2_mixer-static> @@ -70,6 +71,7 @@ if (SDL_STATIC) list(APPEND CEN_TARGETS centurion-static) target_link_libraries(centurion-static INTERFACE centurion-headers-only + $<$:SDL2::SDL2main> SDL2::SDL2-static SDL2_image::SDL2_image-static SDL2_mixer::SDL2_mixer-static