File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -285,8 +285,15 @@ endif()
285285
286286find_package (PNG QUIET )
287287if (PNG_FOUND)
288- target_compile_definitions (CEmu PRIVATE "PNG_SUPPORT" )
289- target_link_libraries (CEmu PRIVATE PNG::PNG)
288+ include (CheckSymbolExists)
289+ set (CMAKE_REQUIRED_INCLUDES ${PNG_INCLUDE_DIRS} )
290+ check_symbol_exists(PNG_WRITE_APNG_SUPPORTED "png.h" HAVE_PROPER_APNG_LIB)
291+ if (HAVE_PROPER_APNG_LIB)
292+ target_compile_definitions (CEmu PRIVATE "PNG_SUPPORT" )
293+ target_link_libraries (CEmu PRIVATE PNG::PNG)
294+ else ()
295+ message (WARNING "The LibPNG found does not seem to support APNG. APNG capture will not be available" )
296+ endif ()
290297else ()
291298 message (WARNING "No LibPNG found! APNG capture will not be available" )
292299endif ()
You can’t perform that action at this time.
0 commit comments