Skip to content

Commit 5289a2d

Browse files
committed
cmake: temporarily disable apng capture on intel macs.
1 parent 26cddec commit 5289a2d

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

gui/qt/CMakeLists.txt

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

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

302306
target_link_libraries(CEmu PRIVATE

0 commit comments

Comments
 (0)