Link some libraries needed for physfs on windows (there are still 5 symbols which couldn't be found - to be resolved)
authorunc0rr
Mon, 19 Nov 2012 17:41:09 +0400
changeset 8067 34a679e5ca9d
parent 8066 1a61fe7c160d
child 8068 b35427506169
Link some libraries needed for physfs on windows (there are still 5 symbols which couldn't be found - to be resolved)
hedgewars/CMakeLists.txt
hedgewars/uPhysFSLayer.pas
--- a/hedgewars/CMakeLists.txt	Mon Nov 19 10:38:02 2012 +0400
+++ b/hedgewars/CMakeLists.txt	Mon Nov 19 17:41:09 2012 +0400
@@ -233,6 +233,14 @@
     message(STATUS "Video recording disabled by user")
 endif()
 
+if(MINGW)
+    get_filename_component(MINGWBINPATH ${CMAKE_C_COMPILER} PATH)
+    set(MINGWLIBPATH "${MINGWBINPATH}/../lib"
+            CACHE FILEPATH "Path to MinGW import libraries")
+
+    set(pascal_flags "-Fl${MINGWLIBPATH}" ${pascal_flags})
+endif(MINGW)
+
 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project})
 
 IF(NOT APPLE)
--- a/hedgewars/uPhysFSLayer.pas	Mon Nov 19 10:38:02 2012 +0400
+++ b/hedgewars/uPhysFSLayer.pas	Mon Nov 19 17:41:09 2012 +0400
@@ -7,6 +7,14 @@
     {$LINKLIB ../bin/libphysfsrwops.a}
 {$ENDIF}
 
+{$IFDEF WIN32}
+    {$LINKLIB kernel32}
+    {$LINKLIB user32}
+    {$LINKLIB shell32}
+    {$LINKLIB advapi32}
+    {$LINKLIB msvcrt}
+{$ENDIF}
+
 {$IFDEF DARWIN}
     {$LINKFRAMEWORK IOKit}
 {$ENDIF}