hedgewars/CMakeLists.txt
changeset 7114 e0110a1229b7
parent 7112 38c5d56c4d6e
child 7180 53ffc8853008
child 7223 b554726ff468
equal deleted inserted replaced
7113:d54e666c395d 7114:e0110a1229b7
   164     message(FATAL_ERROR "No FreePascal compiler found!")
   164     message(FATAL_ERROR "No FreePascal compiler found!")
   165 endif()
   165 endif()
   166 
   166 
   167 
   167 
   168 #DEPENDECIES AND EXECUTABLES SECTION
   168 #DEPENDECIES AND EXECUTABLES SECTION
   169 find_package(PNG)
   169 if(NOT NOPNG)
   170 if(${PNG_FOUND})
   170     find_package(PNG)
   171     message(STATUS "PNG screenshots enabled (library found at ${PNG_LIBRARY})")
   171     if(${PNG_FOUND})
   172     set(pascal_flags "-dPNG_SCREENSHOTS" ${pascal_flags})
   172         message(STATUS "PNG screenshots enabled (library found at ${PNG_LIBRARY})")
   173     if(APPLE)  # need to explictly link with the static lib
   173         set(pascal_flags "-dPNG_SCREENSHOTS" ${pascal_flags})
   174         string(REGEX REPLACE "(.*)libpng.*" "\\1" PNG_LIBDIR "${PNG_LIBRARY}")
   174         if(APPLE)  # need to explictly link with the static lib
   175         set(pascal_flags "-k${PNG_LIBDIR}/libpng.a" ${pascal_flags})
   175             string(REGEX REPLACE "(.*)libpng.*" "\\1" PNG_LIBDIR "${PNG_LIBRARY}")
   176     endif()
   176             set(pascal_flags "-k${PNG_LIBDIR}/libpng.a" ${pascal_flags})
   177 else()
   177         endif()
   178     message(STATUS "PNG library not found, switching to screenshots in BMP format")
   178     else()
       
   179         message(STATUS "PNG library not found, switching to screenshots in BMP format")
       
   180     endif()
   179 endif()
   181 endif()
   180 
   182 
   181 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project})
   183 set(fpc_flags ${noexecstack_flags} ${pascal_flags} ${hwengine_project})
   182 
   184 
   183 
   185