diff -r e6094d329108 -r be298851fc7b hedgewars/CMakeLists.txt --- 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})