hedgewars/CMakeLists.txt
changeset 8067 34a679e5ca9d
parent 8064 202e2cce7077
child 8073 5a289ef40fdb
--- 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)