From 95358ba4fe547958323182daa40857276f24cda2 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Mon, 22 Aug 2022 20:59:56 -0500 Subject: [PATCH] cmake: add exchndl link on mingw32 --- src/sdl/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sdl/CMakeLists.txt b/src/sdl/CMakeLists.txt index 8f2c6c64..b20adb09 100644 --- a/src/sdl/CMakeLists.txt +++ b/src/sdl/CMakeLists.txt @@ -185,6 +185,14 @@ if(${SDL2_FOUND}) ) endif() + if(${CMAKE_SYSTEM} MATCHES Windows AND ${CMAKE_C_COMPILER_ID} MATCHES "GNU" AND ${SRB2_SYSTEM_BITS} EQUAL 32) + target_link_libraries(SRB2SDL2 PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/../../libs/drmingw/lib/win32/libexchndl.a" + "${CMAKE_CURRENT_SOURCE_DIR}/../../libs/drmingw/lib/win32/libmgwhelp.a" + ) + target_include_directories(SRB2SDL2 PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../libs/drmingw/include") + endif() + #target_link_libraries(SRB2SDL2 PRIVATE SRB2Core) if(${SRB2_USEASM})