it's still not really clear to my why this is needed, maybe only in combination with -XD
--- a/hedgewars/CMakeLists.txt Sun Apr 21 01:35:30 2013 +0200
+++ b/hedgewars/CMakeLists.txt Sun Apr 21 01:36:08 2013 +0200
@@ -169,7 +169,7 @@
if(PNG_FOUND)
list(REMOVE_AT PNG_LIBRARIES 1) #removing the zlib library path
get_filename_component(PNG_LIBRARY_DIR ${PNG_LIBRARIES} PATH)
- list(APPEND pascal_flags "-dPNG_SCREENSHOTS" "-Fl${PNG_LIBRARY_DIR}")
+ list(APPEND pascal_flags "-dPNG_SCREENSHOTS" "-Fl${PNG_LIBRARY_DIR}" "-k-L${PNG_LIBRARY_DIR}")
endif()