CMakeLists: Add flag to disable usage of shared libpng

This commit is contained in:
OatmealDome 2022-05-22 01:19:44 -04:00
parent df22439826
commit 2648837d8c
1 changed files with 5 additions and 1 deletions

View File

@ -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)