fix osx build
authorkoda
Tue, 02 Apr 2013 23:02:06 +0200
changeset 8832 4e9728dcebeb
parent 8830 343d3f0d6a86
child 8835 01bcf9ea68c1
fix osx build
hedgewars/CMakeLists.txt
--- 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()