From 3897c9a28a4f85fcc6c927514ff21df409bdad4d Mon Sep 17 00:00:00 2001 From: Louis M Date: Mon, 10 Jun 2024 19:44:22 -0400 Subject: [PATCH] put -lmingw32 in a conditionnal to keep MDC compatibility --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 361a36e..02fdba0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -206,7 +206,11 @@ if(NOT SDL_FOUND) set(SDLMAIN_LIBRARY "${SDLDIR}/lib/win32/SDLmain.lib" CACHE FILEPATH "Where the SDLmain library can be found" FORCE) set(SDL_LIBRARY "${SDLDIR}/lib/win32/SDL.lib" CACHE FILEPATH "Where the SDL library can be found" FORCE) endif(AQUARIA_USE_SDL2) - set(SDL_LIBRARY -lmingw32 ${SDLMAIN_LIBRARY} ${SDL_LIBRARY}) # not seen by user + if(MSYS) + set(SDL_LIBRARY -lmingw32 ${SDLMAIN_LIBRARY} ${SDL_LIBRARY}) # not seen by user + elseif(MSYS) + set(SDL_LIBRARY ${SDLMAIN_LIBRARY} ${SDL_LIBRARY}) # not seen by user + endif(MSYS) else(MACOSX) message(SEND_ERROR "We don't have a prebuilt SDL for this platform.") endif(MACOSX)