--- 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})
--- a/hedgewars/options.inc Mon Apr 23 04:05:18 2012 +0200
+++ b/hedgewars/options.inc Mon Apr 23 04:14:21 2012 +0200
@@ -64,7 +64,6 @@
{$ENDIF}
{$IFNDEF MOBILE}
- {$DEFINE PNG_SCREENSHOTS}
{$DEFINE USE_AM_NUMCOLUMN}
{$ENDIF}