hedgewars/CMakeLists.txt
changeset 7114 e0110a1229b7
parent 7112 38c5d56c4d6e
child 7180 53ffc8853008
child 7223 b554726ff468
--- a/hedgewars/CMakeLists.txt	Wed May 23 01:53:25 2012 +0200
+++ b/hedgewars/CMakeLists.txt	Wed May 23 02:39:30 2012 +0200
@@ -166,16 +166,18 @@
 
 
 #DEPENDECIES AND EXECUTABLES SECTION
-find_package(PNG)
-if(${PNG_FOUND})
-    message(STATUS "PNG screenshots enabled (library found at ${PNG_LIBRARY})")
-    set(pascal_flags "-dPNG_SCREENSHOTS" ${pascal_flags})
-    if(APPLE)  # need to explictly link with the static lib
-        string(REGEX REPLACE "(.*)libpng.*" "\\1" PNG_LIBDIR "${PNG_LIBRARY}")
-        set(pascal_flags "-k${PNG_LIBDIR}/libpng.a" ${pascal_flags})
+if(NOT NOPNG)
+    find_package(PNG)
+    if(${PNG_FOUND})
+        message(STATUS "PNG screenshots enabled (library found at ${PNG_LIBRARY})")
+        set(pascal_flags "-dPNG_SCREENSHOTS" ${pascal_flags})
+        if(APPLE)  # need to explictly link with the static lib
+            string(REGEX REPLACE "(.*)libpng.*" "\\1" PNG_LIBDIR "${PNG_LIBRARY}")
+            set(pascal_flags "-k${PNG_LIBDIR}/libpng.a" ${pascal_flags})
+        endif()
+    else()
+        message(STATUS "PNG library not found, switching to screenshots in BMP format")
     endif()
-else()
-    message(STATUS "PNG library not found, switching to screenshots in BMP format")
 endif()
 
 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project})