shithub: cstory

Download patch

ref: 593315eb53602ddeff22cfd2e46b6d727808a681
parent: 624adbdab89dc121d22dc784ebdf1cc760055885
author: Gabriel Ravier <gabravier@gmail.com>
date: Wed Apr 15 20:11:03 EDT 2020

CMakeLists: Made build work for cross-compile with mingw

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -245,11 +245,11 @@
 ################
 
 # Link libraries
-target_link_libraries(CSE2 PRIVATE ddraw.lib dsound.lib version.lib shlwapi.lib imm32.lib winmm.lib dxguid.lib)
+target_link_libraries(CSE2 PRIVATE ddraw dsound version shlwapi imm32 winmm dxguid gdi32)
 
-# Newer MSVC is missing `dinput.lib`
+# Newer MSVC is missing `dinput.lib`, we need to use `dinput8.lib`
 if(MSVC AND MSVC_VERSION GREATER_EQUAL 1500)
-	target_link_libraries(CSE2 PRIVATE dinput8.lib)
+	target_link_libraries(CSE2 PRIVATE dinput8)
 else()
-	target_link_libraries(CSE2 PRIVATE dinput.lib)
+	target_link_libraries(CSE2 PRIVATE dinput)
 endif()