From 979ea9275460abef4bec95a7e930f4dd748c4360 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Thu, 4 Jun 2015 20:22:05 +0200 Subject: [PATCH] gsdx: make png++ optional Some distributions (Fedora) doesn't have a png++ package... --- cmake/SelectPcsx2Plugins.cmake | 2 +- plugins/GSdx/CMakeLists.txt | 4 ++++ plugins/GSdx/config.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/SelectPcsx2Plugins.cmake b/cmake/SelectPcsx2Plugins.cmake index 5bd548d9b6..5dd07e42a4 100644 --- a/cmake/SelectPcsx2Plugins.cmake +++ b/cmake/SelectPcsx2Plugins.cmake @@ -144,7 +144,7 @@ endif() # requires: -OpenGL # -X11 #--------------------------------------- -if(OPENGL_FOUND AND X11_FOUND AND PNGPP_FOUND AND GTKn_FOUND AND PNG_FOUND AND (EGL_FOUND OR NOT EGL_API)) +if(OPENGL_FOUND AND X11_FOUND AND GTKn_FOUND AND PNG_FOUND AND (EGL_FOUND OR NOT EGL_API)) set(GSdx TRUE) elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/GSdx") set(GSdx FALSE) diff --git a/plugins/GSdx/CMakeLists.txt b/plugins/GSdx/CMakeLists.txt index 0998238075..ae007947b8 100644 --- a/plugins/GSdx/CMakeLists.txt +++ b/plugins/GSdx/CMakeLists.txt @@ -44,6 +44,10 @@ if(LIBLZMA_FOUND) set(GSdxFinalFlags ${GSdxFinalFlags} -DLZMA_SUPPORTED) endif() +if(PNGPP_FOUND) + set(GSdxFinalFlags ${GSdxFinalFlags} -DPNGPP_SUPPORTED) +endif() + #Clang doesn't support a few common flags that GCC does. if(NOT USE_CLANG) set(GSdxFinalFlags ${GSdxFinalFlags} -fabi-version=6) diff --git a/plugins/GSdx/config.h b/plugins/GSdx/config.h index 15c75710d1..299babaf30 100644 --- a/plugins/GSdx/config.h +++ b/plugins/GSdx/config.h @@ -49,7 +49,7 @@ //#define ENABLE_OPENCL #endif -#if defined(__linux__) +#if defined(__linux__) && PNGPP_SUPPORTED // Allow to dump texture as PNG (require libpng++). It reduces the size of the dump // and alpha is well supported (on linux) #define ENABLE_OGL_PNG