hedgewars/CMakeLists.txt
changeset 8832 4e9728dcebeb
parent 8830 343d3f0d6a86
child 8847 ff7fbab7cd56
child 8932 e095e3023682
--- a/hedgewars/CMakeLists.txt	Mon Apr 01 23:26:41 2013 +0400
+++ b/hedgewars/CMakeLists.txt	Tue Apr 02 23:02:06 2013 +0200
@@ -167,8 +167,9 @@
 
 find_package_or_disable_msg(PNG NOPNG "Screenshots will be saved in BMP")
 if(PNG_FOUND)
-    list(REMOVE_AT PNG_INCLUDE_DIR 1) #removing the zlib include path
-    list(APPEND pascal_flags "-dPNG_SCREENSHOTS" "-Fl${PNG_INCLUDE_DIR}")
+    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}")
 endif()