File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -285,8 +285,16 @@ 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+ set_property (TARGET CEmu PROPERTY AUTOMOC_MOC_OPTIONS "-DPNG_WRITE_APNG_SUPPORTED" )
293+ target_compile_definitions (CEmu PRIVATE "PNG_SUPPORT" )
294+ target_link_libraries (CEmu PRIVATE PNG::PNG)
295+ else ()
296+ message (WARNING "The LibPNG found does not seem to support APNG. APNG capture will not be available" )
297+ endif ()
290298else ()
291299 message (WARNING "No LibPNG found! APNG capture will not be available" )
292300endif ()
You can’t perform that action at this time.
0 commit comments