hedgewars/CMakeLists.txt
changeset 8887 539380a498e4
parent 8832 4e9728dcebeb
child 8847 ff7fbab7cd56
child 8932 e095e3023682
--- a/hedgewars/CMakeLists.txt	Tue Mar 26 18:52:42 2013 +0100
+++ b/hedgewars/CMakeLists.txt	Sun Apr 07 22:53:40 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()