hedgewars/CMakeLists.txt
changeset 6915 be298851fc7b
parent 6881 ee01eeaa1281
child 6916 50243b6ffab5
--- a/hedgewars/CMakeLists.txt	Mon Apr 23 04:05:18 2012 +0200
+++ b/hedgewars/CMakeLists.txt	Mon Apr 23 04:14:21 2012 +0200
@@ -142,6 +142,13 @@
     message(FATAL_ERROR "No Pascal compiler found!")
 endif()
 
+find_package(png)
+if(${PNG_LIBRARY})
+    set(pascal_compiler_flags_cmn "-dPNG_SCREENSHOTS" ${pascal_compiler_flags_cmn})
+else()
+    message(STATUS "PNG library not found, switching to screenshots in BMP format")
+endif()
+
 set(pascal_compiler ${fpc_executable})
 set(pascal_compiler_flags ${noexecstack_flags} ${pascal_compiler_flags_cmn} ${hwengine_project})