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)