From 2648837d8c173c23af515f5804ca2db9b20950a9 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Sun, 22 May 2022 01:19:44 -0400 Subject: [PATCH] CMakeLists: Add flag to disable usage of shared libpng --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a22ed7534..bf5c46b436 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,7 @@ if(NOT ANDROID) endif() option(USE_SHARED_ENET "Use shared libenet if found rather than Dolphin's soon-to-compatibly-diverge version" OFF) +option(USE_SHARED_LIBPNG "Use shared libpng if found" ON) option(USE_UPNP "Enables UPnP port mapping support" ON) option(ENABLE_NOGUI "Enable NoGUI frontend" ON) option(ENABLE_QT "Enable Qt (Default)" ON) @@ -413,6 +414,9 @@ if(CMAKE_SYSTEM_NAME MATCHES "Darwin") find_library(IOB_LIBRARY IOBluetooth) find_library(IOK_LIBRARY IOKit) find_library(OPENGL_LIBRARY OpenGL) + + # We don't want to use shared libpng. + set(USE_SHARED_LIBPNG OFF) endif() if(ENABLE_LTO) @@ -786,7 +790,7 @@ else() set(LZO lzo2) endif() -if(NOT APPLE) +if(USE_SHARED_LIBPNG) check_lib(PNG libpng png png.h QUIET) endif() if (PNG_FOUND)