hedgewars/CMakeLists.txt
changeset 7223 b554726ff468
parent 7114 e0110a1229b7
child 7231 f484455dd055
child 7233 225179f64fd8
equal deleted inserted replaced
7220:dfe678f129e4 7223:b554726ff468
   169 if(NOT NOPNG)
   169 if(NOT NOPNG)
   170     find_package(PNG)
   170     find_package(PNG)
   171     if(${PNG_FOUND})
   171     if(${PNG_FOUND})
   172         message(STATUS "PNG screenshots enabled (library found at ${PNG_LIBRARY})")
   172         message(STATUS "PNG screenshots enabled (library found at ${PNG_LIBRARY})")
   173         set(pascal_flags "-dPNG_SCREENSHOTS" ${pascal_flags})
   173         set(pascal_flags "-dPNG_SCREENSHOTS" ${pascal_flags})
   174         if(APPLE)  # need to explictly link with the static lib
   174         if(APPLE)  # need to explictly link with the static lib -- maybe windows too?
   175             string(REGEX REPLACE "(.*)libpng.*" "\\1" PNG_LIBDIR "${PNG_LIBRARY}")
   175             string(REGEX REPLACE "(.*)libpng.*" "\\1" PNG_LIBDIR "${PNG_LIBRARY}")
   176             set(pascal_flags "-k${PNG_LIBDIR}/libpng.a" ${pascal_flags})
   176             set(pascal_flags "-k${PNG_LIBDIR}/libpng.a" ${pascal_flags})
   177         endif()
   177         endif()
   178     else()
   178     else()
   179         message(STATUS "PNG library not found, switching to screenshots in BMP format")
   179         message(STATUS "PNG library not found, switching to screenshots in BMP format")
   180     endif()
   180     endif()
       
   181 else()
       
   182     message(STATUS "PNG screenshots disabled per user request, using BMP format")
   181 endif()
   183 endif()
   182 
   184 
   183 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project})
   185 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project})
   184 
   186 
   185 
   187