mirror of https://github.com/PCSX2/pcsx2.git
cmake: properly add detection of lzma
Code is 100% optional. Code will allow be enabled if lzma-dev is installed at compile time
This commit is contained in:
parent
98dde32dc0
commit
5c046180a1
|
@ -7,6 +7,8 @@ find_package(BZip2)
|
|||
find_package(Gettext) # translation tool
|
||||
find_package(Git)
|
||||
find_package(JPEG)
|
||||
find_package(LibLZMA)
|
||||
find_package(PNG)
|
||||
find_package(OpenGL)
|
||||
# The requirement of wxWidgets is checked in SelectPcsx2Plugins module
|
||||
# Does not require the module (allow to compile non-wx plugins)
|
||||
|
|
|
@ -144,7 +144,7 @@ endif()
|
|||
# requires: -OpenGL
|
||||
# -X11
|
||||
#---------------------------------------
|
||||
if(OPENGL_FOUND AND X11_FOUND AND PNGPP_FOUND AND GTKn_FOUND AND (EGL_FOUND OR NOT EGL_API))
|
||||
if(OPENGL_FOUND AND X11_FOUND AND PNGPP_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)
|
||||
|
|
|
@ -40,6 +40,10 @@ if(EGL_API AND EGL_FOUND)
|
|||
set(GSdxFinalFlags ${GSdxFinalFlags} -DEGL_SUPPORTED)
|
||||
endif()
|
||||
|
||||
if(LIBLZMA_FOUND)
|
||||
set(GSdxFinalFlags ${GSdxFinalFlags} -DLZMA_SUPPORTED)
|
||||
endif()
|
||||
|
||||
#Clang doesn't support a few common flags that GCC does.
|
||||
if(NOT USE_CLANG)
|
||||
set(GSdxFinalFlags ${GSdxFinalFlags} -fabi-version=6)
|
||||
|
@ -203,8 +207,7 @@ set(GSdxFinalLibs ${GSdxFinalLibs}
|
|||
${OPENGL_LIBRARIES}
|
||||
${GTK2_LIBRARIES}
|
||||
${LIBC_LIBRARIES}
|
||||
"-lpng" # yes it sucks
|
||||
"-llzma"
|
||||
${PNG_LIBRARY}
|
||||
)
|
||||
|
||||
if(EGL_API AND EGL_FOUND)
|
||||
|
@ -213,6 +216,12 @@ if(EGL_API AND EGL_FOUND)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(LIBLZMA_FOUND)
|
||||
set(GSdxFinalLibs ${GSdxFinalLibs}
|
||||
${LIBLZMA_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Generate Glsl header file. Protect with REBUILD_SHADER to avoid build-dependency on PERL
|
||||
if (REBUILD_SHADER)
|
||||
add_custom_command(OUTPUT res/glsl_source.h COMMAND perl ${CMAKE_SOURCE_DIR}/linux_various/glsl2h.pl)
|
||||
|
|
Loading…
Reference in New Issue