Skip to content

Commit ba175ef

Browse files
committed
cmake: libpng-apng: adjust AUTOMOC_MOC_OPTIONS even more
1 parent 90051ce commit ba175ef

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

gui/qt/CMakeLists.txt

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -284,24 +284,20 @@ if(PkgConfig_FOUND)
284284
endif()
285285
endif()
286286

287-
if(APPLE AND NOT (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64"))
288-
message("For now, libpng-apng is disabled on intel macs... see issue #528. APNG capture will not be available")
289-
else()
290-
find_package(PNG QUIET)
291-
if(PNG_FOUND)
292-
include(CheckSymbolExists)
293-
set(CMAKE_REQUIRED_INCLUDES ${PNG_INCLUDE_DIRS})
294-
check_symbol_exists(PNG_WRITE_APNG_SUPPORTED "png.h" HAVE_PROPER_APNG_LIB)
295-
if(HAVE_PROPER_APNG_LIB)
296-
set_property(TARGET CEmu PROPERTY AUTOMOC_MOC_OPTIONS "-DPNG_WRITE_APNG_SUPPORTED")
297-
target_compile_definitions(CEmu PRIVATE "PNG_SUPPORT")
298-
target_link_libraries(CEmu PRIVATE PNG::PNG)
299-
else()
300-
message(WARNING "The LibPNG found does not seem to support APNG. APNG capture will not be available")
301-
endif()
287+
find_package(PNG QUIET)
288+
if(PNG_FOUND)
289+
include(CheckSymbolExists)
290+
set(CMAKE_REQUIRED_INCLUDES ${PNG_INCLUDE_DIRS})
291+
check_symbol_exists(PNG_WRITE_APNG_SUPPORTED "png.h" HAVE_PROPER_APNG_LIB)
292+
if(HAVE_PROPER_APNG_LIB)
293+
set_property(TARGET CEmu APPEND PROPERTY AUTOMOC_MOC_OPTIONS "-DPNG_SUPPORT" "-DPNG_WRITE_APNG_SUPPORTED")
294+
target_compile_definitions(CEmu PRIVATE "PNG_SUPPORT")
295+
target_link_libraries(CEmu PRIVATE PNG::PNG)
302296
else()
303-
message(WARNING "No LibPNG found! APNG capture will not be available")
297+
message(WARNING "The LibPNG found does not seem to support APNG. APNG capture will not be available")
304298
endif()
299+
else()
300+
message(WARNING "No LibPNG found! APNG capture will not be available")
305301
endif()
306302

307303
target_link_libraries(CEmu PRIVATE

0 commit comments

Comments
 (0)