mirror of https://github.com/PCSX2/pcsx2.git
cmake: initial cleanup of the dep lookup
This commit is contained in:
parent
1893bfe93d
commit
fd39f14b4e
|
@ -290,3 +290,72 @@ endif()
|
||||||
|
|
||||||
add_subdirectory(3rdparty/libchdr/libchdr EXCLUDE_FROM_ALL)
|
add_subdirectory(3rdparty/libchdr/libchdr EXCLUDE_FROM_ALL)
|
||||||
include_directories(3rdparty/libchdr/libchdr/include)
|
include_directories(3rdparty/libchdr/libchdr/include)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Dependency message print
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
set(msg_dep_common_libs "check these libraries -> wxWidgets (>=3.0), aio")
|
||||||
|
set(msg_dep_pcsx2 "check these libraries -> wxWidgets (>=3.0), gtk2, zlib (>=1.2.4), pcsx2 common libs")
|
||||||
|
set(msg_dep_gsdx "check these libraries -> opengl, png (>=1.2), zlib (>=1.2.4), X11, liblzma")
|
||||||
|
|
||||||
|
macro(print_dep str dep)
|
||||||
|
if (PACKAGE_MODE)
|
||||||
|
message(FATAL_ERROR "${str}:${dep}")
|
||||||
|
else()
|
||||||
|
message(STATUS "${str}:${dep}")
|
||||||
|
endif()
|
||||||
|
endmacro(print_dep)
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Pcsx2 core & common libs
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
# Check for additional dependencies.
|
||||||
|
# If all dependencies are available, including OS, build it
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
if (GTK2_FOUND OR GTK3_FOUND)
|
||||||
|
set(GTKn_FOUND TRUE)
|
||||||
|
elseif(APPLE) # Not we have but that we don't change all if(gtkn) entries
|
||||||
|
set(GTKn_FOUND TRUE)
|
||||||
|
else()
|
||||||
|
set(GTKn_FOUND FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(SDL_FOUND OR SDL2_FOUND)
|
||||||
|
set(SDLn_FOUND TRUE)
|
||||||
|
else()
|
||||||
|
set(SDLn_FOUND FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(wxWidgets_FOUND)
|
||||||
|
set(common_libs TRUE)
|
||||||
|
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/common/src")
|
||||||
|
set(common_libs FALSE)
|
||||||
|
else()
|
||||||
|
set(common_libs FALSE)
|
||||||
|
print_dep("Skip build of common libraries: missing dependencies" "${msg_dep_common_libs}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Common dependancy
|
||||||
|
if(wxWidgets_FOUND AND ZLIB_FOUND AND common_libs AND NOT (Linux AND NOT AIO_FOUND))
|
||||||
|
if(OPENGL_FOUND AND X11_FOUND AND GTKn_FOUND AND ZLIB_FOUND AND PNG_FOUND AND FREETYPE_FOUND AND LIBLZMA_FOUND AND ((EGL_FOUND AND X11_XCB_FOUND) OR APPLE))
|
||||||
|
set(pcsx2_core TRUE)
|
||||||
|
else()
|
||||||
|
print_dep("Skip build of pcsx2 core: missing dependencies" "${msg_dep_pcsx2}")
|
||||||
|
set(pcsx2_core FALSE)
|
||||||
|
endif()
|
||||||
|
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/pcsx2")
|
||||||
|
set(pcsx2_core FALSE)
|
||||||
|
else()
|
||||||
|
set(pcsx2_core FALSE)
|
||||||
|
print_dep("Skip build of pcsx2 core: missing dependencies" "${msg_dep_pcsx2}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Linux, BSD, use gtk2, but not OSX
|
||||||
|
if(UNIX AND pcsx2_core AND NOT GTKn_FOUND AND NOT APPLE)
|
||||||
|
set(pcsx2_core FALSE)
|
||||||
|
print_dep("Skip build of pcsx2 core: missing dependencies" "${msg_dep_pcsx2}")
|
||||||
|
endif()
|
||||||
|
|
|
@ -103,7 +103,6 @@ set(pcsx2Sources
|
||||||
Patch.cpp
|
Patch.cpp
|
||||||
Patch_Memory.cpp
|
Patch_Memory.cpp
|
||||||
Pcsx2Config.cpp
|
Pcsx2Config.cpp
|
||||||
PluginManager.cpp
|
|
||||||
PrecompiledHeader.cpp
|
PrecompiledHeader.cpp
|
||||||
R3000A.cpp
|
R3000A.cpp
|
||||||
R3000AInterpreter.cpp
|
R3000AInterpreter.cpp
|
||||||
|
@ -173,7 +172,6 @@ set(pcsx2Headers
|
||||||
MemoryTypes.h
|
MemoryTypes.h
|
||||||
Patch.h
|
Patch.h
|
||||||
PathDefs.h
|
PathDefs.h
|
||||||
Plugins.h
|
|
||||||
PrecompiledHeader.h
|
PrecompiledHeader.h
|
||||||
R3000A.h
|
R3000A.h
|
||||||
R5900Exceptions.h
|
R5900Exceptions.h
|
||||||
|
@ -581,154 +579,154 @@ set(pcsx2PADHeaders
|
||||||
|
|
||||||
# GS sources
|
# GS sources
|
||||||
set(pcsx2GSSources
|
set(pcsx2GSSources
|
||||||
GS.cpp
|
GS/GS.cpp
|
||||||
GSAlignedClass.cpp
|
GS/GSAlignedClass.cpp
|
||||||
GSBlock.cpp
|
GS/GSBlock.cpp
|
||||||
GSCapture.cpp
|
GS/GSCapture.cpp
|
||||||
GSClut.cpp
|
GS/GSClut.cpp
|
||||||
GSCodeBuffer.cpp
|
GS/GSCodeBuffer.cpp
|
||||||
GSCrc.cpp
|
GS/GSCrc.cpp
|
||||||
GSDrawingContext.cpp
|
GS/GSDrawingContext.cpp
|
||||||
GSDump.cpp
|
GS/GSDump.cpp
|
||||||
GSLocalMemory.cpp
|
GS/GSLocalMemory.cpp
|
||||||
GSLzma.cpp
|
GS/GSLzma.cpp
|
||||||
GSPerfMon.cpp
|
GS/GSPerfMon.cpp
|
||||||
GSPng.cpp
|
GS/GSPng.cpp
|
||||||
GSState.cpp
|
GS/GSState.cpp
|
||||||
GSTables.cpp
|
GS/GSTables.cpp
|
||||||
GSUtil.cpp
|
GS/GSUtil.cpp
|
||||||
GSVector.cpp
|
GS/GSVector.cpp
|
||||||
GSdx.cpp
|
GS/GSdx.cpp
|
||||||
GSdxResources.cpp
|
GS/GS_res.cpp
|
||||||
stdafx.cpp
|
GS/stdafx.cpp
|
||||||
Renderers/Common/GSDevice.cpp
|
GS/Renderers/Common/GSDevice.cpp
|
||||||
Renderers/Common/GSDirtyRect.cpp
|
GS/Renderers/Common/GSDirtyRect.cpp
|
||||||
Renderers/Common/GSFunctionMap.cpp
|
GS/Renderers/Common/GSFunctionMap.cpp
|
||||||
Renderers/Common/GSOsdManager.cpp
|
GS/Renderers/Common/GSOsdManager.cpp
|
||||||
Renderers/Common/GSRenderer.cpp
|
GS/Renderers/Common/GSRenderer.cpp
|
||||||
Renderers/Common/GSTexture.cpp
|
GS/Renderers/Common/GSTexture.cpp
|
||||||
Renderers/Common/GSVertexTrace.cpp
|
GS/Renderers/Common/GSVertexTrace.cpp
|
||||||
Renderers/Null/GSDeviceNull.cpp
|
GS/Renderers/Null/GSDeviceNull.cpp
|
||||||
Renderers/Null/GSRendererNull.cpp
|
GS/Renderers/Null/GSRendererNull.cpp
|
||||||
Renderers/Null/GSTextureNull.cpp
|
GS/Renderers/Null/GSTextureNull.cpp
|
||||||
Renderers/HW/GSHwHack.cpp
|
GS/Renderers/HW/GSHwHack.cpp
|
||||||
Renderers/HW/GSRendererHW.cpp
|
GS/Renderers/HW/GSRendererHW.cpp
|
||||||
Renderers/HW/GSTextureCache.cpp
|
GS/Renderers/HW/GSTextureCache.cpp
|
||||||
Renderers/SW/GSDrawScanline.cpp
|
GS/Renderers/SW/GSDrawScanline.cpp
|
||||||
Renderers/SW/GSDrawScanlineCodeGenerator.cpp
|
GS/Renderers/SW/GSDrawScanlineCodeGenerator.cpp
|
||||||
Renderers/SW/GSDrawScanlineCodeGenerator.x64.cpp
|
GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.cpp
|
||||||
Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx.cpp
|
GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx.cpp
|
||||||
Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx2.cpp
|
GS/Renderers/SW/GSDrawScanlineCodeGenerator.x64.avx2.cpp
|
||||||
Renderers/SW/GSDrawScanlineCodeGenerator.x86.cpp
|
GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.cpp
|
||||||
Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx.cpp
|
GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx.cpp
|
||||||
Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx2.cpp
|
GS/Renderers/SW/GSDrawScanlineCodeGenerator.x86.avx2.cpp
|
||||||
Renderers/SW/GSRasterizer.cpp
|
GS/Renderers/SW/GSRasterizer.cpp
|
||||||
Renderers/SW/GSRendererSW.cpp
|
GS/Renderers/SW/GSRendererSW.cpp
|
||||||
Renderers/SW/GSSetupPrimCodeGenerator.cpp
|
GS/Renderers/SW/GSSetupPrimCodeGenerator.cpp
|
||||||
Renderers/SW/GSSetupPrimCodeGenerator.x64.cpp
|
GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.cpp
|
||||||
Renderers/SW/GSSetupPrimCodeGenerator.x64.avx.cpp
|
GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.avx.cpp
|
||||||
Renderers/SW/GSSetupPrimCodeGenerator.x64.avx2.cpp
|
GS/Renderers/SW/GSSetupPrimCodeGenerator.x64.avx2.cpp
|
||||||
Renderers/SW/GSSetupPrimCodeGenerator.x86.cpp
|
GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.cpp
|
||||||
Renderers/SW/GSSetupPrimCodeGenerator.x86.avx.cpp
|
GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.avx.cpp
|
||||||
Renderers/SW/GSSetupPrimCodeGenerator.x86.avx2.cpp
|
GS/Renderers/SW/GSSetupPrimCodeGenerator.x86.avx2.cpp
|
||||||
Renderers/SW/GSTextureCacheSW.cpp
|
GS/Renderers/SW/GSTextureCacheSW.cpp
|
||||||
Renderers/SW/GSTextureSW.cpp
|
GS/Renderers/SW/GSTextureSW.cpp
|
||||||
Renderers/OpenGL/GLLoader.cpp
|
GS/Renderers/OpenGL/GLLoader.cpp
|
||||||
Renderers/OpenGL/GLState.cpp
|
GS/Renderers/OpenGL/GLState.cpp
|
||||||
Renderers/OpenGL/GSDeviceOGL.cpp
|
GS/Renderers/OpenGL/GSDeviceOGL.cpp
|
||||||
Renderers/OpenGL/GSRendererOGL.cpp
|
GS/Renderers/OpenGL/GSRendererOGL.cpp
|
||||||
Renderers/OpenGL/GSShaderOGL.cpp
|
GS/Renderers/OpenGL/GSShaderOGL.cpp
|
||||||
Renderers/OpenGL/GSTextureCacheOGL.cpp
|
GS/Renderers/OpenGL/GSTextureCacheOGL.cpp
|
||||||
Renderers/OpenGL/GSTextureOGL.cpp
|
GS/Renderers/OpenGL/GSTextureOGL.cpp
|
||||||
Window/GSSetting.cpp
|
GS/Window/GSSetting.cpp
|
||||||
Window/GSWnd.cpp
|
GS/Window/GSWnd.cpp
|
||||||
Window/GSLinuxDialog.cpp
|
GS/Window/GSLinuxDialog.cpp
|
||||||
Window/GSWndEGL.cpp
|
GS/Window/GSWndEGL.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# GS headers
|
# GS headers
|
||||||
set(pcsx2GSHeaders
|
set(pcsx2GSHeaders
|
||||||
config.h
|
GS/config.h
|
||||||
GSAlignedClass.h
|
GS/GSAlignedClass.h
|
||||||
GSBlock.h
|
GS/GSBlock.h
|
||||||
GSCapture.h
|
GS/GSCapture.h
|
||||||
GSClut.h
|
GS/GSClut.h
|
||||||
GSCodeBuffer.h
|
GS/GSCodeBuffer.h
|
||||||
GSCrc.h
|
GS/GSCrc.h
|
||||||
GSDrawingContext.h
|
GS/GSDrawingContext.h
|
||||||
GSDrawingEnvironment.h
|
GS/GSDrawingEnvironment.h
|
||||||
GSDump.h
|
GS/GSDump.h
|
||||||
GSdx.h
|
GS/GSdx.h
|
||||||
GSdxResources.h
|
GS/GS_res.h
|
||||||
GS.h
|
GS/GS.h
|
||||||
GSLocalMemory.h
|
GS/GSLocalMemory.h
|
||||||
GSLzma.h
|
GS/GSLzma.h
|
||||||
GSPerfMon.h
|
GS/GSPerfMon.h
|
||||||
GSPng.h
|
GS/GSPng.h
|
||||||
GSState.h
|
GS/GSState.h
|
||||||
GSTables.h
|
GS/GSTables.h
|
||||||
GSThread_CXX11.h
|
GS/GSThread_CXX11.h
|
||||||
GSThread.h
|
GS/GSThread.h
|
||||||
GSUtil.h
|
GS/GSUtil.h
|
||||||
GSVector.h
|
GS/GSVector.h
|
||||||
GSVector4.h
|
GS/GSVector4.h
|
||||||
GSVector4i.h
|
GS/GSVector4i.h
|
||||||
GSVector8.h
|
GS/GSVector8.h
|
||||||
GSVector8i.h
|
GS/GSVector8i.h
|
||||||
stdafx.h
|
GS/stdafx.h
|
||||||
Renderers/Common/GSDevice.h
|
GS/Renderers/Common/GSDevice.h
|
||||||
Renderers/Common/GSDirtyRect.h
|
GS/Renderers/Common/GSDirtyRect.h
|
||||||
Renderers/Common/GSFastList.h
|
GS/Renderers/Common/GSFastList.h
|
||||||
Renderers/Common/GSFunctionMap.h
|
GS/Renderers/Common/GSFunctionMap.h
|
||||||
Renderers/Common/GSOsdManager.h
|
GS/Renderers/Common/GSOsdManager.h
|
||||||
Renderers/Common/GSRenderer.h
|
GS/Renderers/Common/GSRenderer.h
|
||||||
Renderers/Common/GSTexture.h
|
GS/Renderers/Common/GSTexture.h
|
||||||
Renderers/Common/GSVertex.h
|
GS/Renderers/Common/GSVertex.h
|
||||||
Renderers/Common/GSVertexList.h
|
GS/Renderers/Common/GSVertexList.h
|
||||||
Renderers/Common/GSVertexTrace.h
|
GS/Renderers/Common/GSVertexTrace.h
|
||||||
Renderers/Null/GSDeviceNull.h
|
GS/Renderers/Null/GSDeviceNull.h
|
||||||
Renderers/Null/GSRendererNull.h
|
GS/Renderers/Null/GSRendererNull.h
|
||||||
Renderers/Null/GSTextureNull.h
|
GS/Renderers/Null/GSTextureNull.h
|
||||||
Renderers/HW/GSRendererHW.h
|
GS/Renderers/HW/GSRendererHW.h
|
||||||
Renderers/HW/GSTextureCache.h
|
GS/Renderers/HW/GSTextureCache.h
|
||||||
Renderers/HW/GSVertexHW.h
|
GS/Renderers/HW/GSVertexHW.h
|
||||||
Renderers/SW/GSDrawScanlineCodeGenerator.h
|
GS/Renderers/SW/GSDrawScanlineCodeGenerator.h
|
||||||
Renderers/SW/GSDrawScanline.h
|
GS/Renderers/SW/GSDrawScanline.h
|
||||||
Renderers/SW/GSRasterizer.h
|
GS/Renderers/SW/GSRasterizer.h
|
||||||
Renderers/SW/GSRendererSW.h
|
GS/Renderers/SW/GSRendererSW.h
|
||||||
Renderers/SW/GSScanlineEnvironment.h
|
GS/Renderers/SW/GSScanlineEnvironment.h
|
||||||
Renderers/SW/GSSetupPrimCodeGenerator.h
|
GS/Renderers/SW/GSSetupPrimCodeGenerator.h
|
||||||
Renderers/SW/GSTextureCacheSW.h
|
GS/Renderers/SW/GSTextureCacheSW.h
|
||||||
Renderers/SW/GSTextureSW.h
|
GS/Renderers/SW/GSTextureSW.h
|
||||||
Renderers/SW/GSVertexSW.h
|
GS/Renderers/SW/GSVertexSW.h
|
||||||
Renderers/OpenGL/GLLoader.h
|
GS/Renderers/OpenGL/GLLoader.h
|
||||||
Renderers/OpenGL/GLState.h
|
GS/Renderers/OpenGL/GLState.h
|
||||||
Renderers/OpenGL/GSDeviceOGL.h
|
GS/Renderers/OpenGL/GSDeviceOGL.h
|
||||||
Renderers/OpenGL/GSRendererOGL.h
|
GS/Renderers/OpenGL/GSRendererOGL.h
|
||||||
Renderers/OpenGL/GSShaderOGL.h
|
GS/Renderers/OpenGL/GSShaderOGL.h
|
||||||
Renderers/OpenGL/GSTextureCacheOGL.h
|
GS/Renderers/OpenGL/GSTextureCacheOGL.h
|
||||||
Renderers/OpenGL/GSTextureOGL.h
|
GS/Renderers/OpenGL/GSTextureOGL.h
|
||||||
Renderers/OpenGL/GSUniformBufferOGL.h
|
GS/Renderers/OpenGL/GSUniformBufferOGL.h
|
||||||
Renderers/OpenGL/GSVertexArrayOGL.h
|
GS/Renderers/OpenGL/GSVertexArrayOGL.h
|
||||||
Window/GSCaptureDlg.h
|
GS/Window/GSCaptureDlg.h
|
||||||
Window/GSDialog.h
|
GS/Window/GSDialog.h
|
||||||
Window/GSSetting.h
|
GS/Window/GSSetting.h
|
||||||
Window/GSSettingsDlg.h
|
GS/Window/GSSettingsDlg.h
|
||||||
Window/GSWnd.h
|
GS/Window/GSWnd.h
|
||||||
Window/GSWndEGL.h
|
GS/Window/GSWndEGL.h
|
||||||
)
|
)
|
||||||
|
|
||||||
# GS resources
|
# GS resources
|
||||||
set(pcsx2GSResources
|
set(pcsx2GSResources
|
||||||
res/logo-ogl.bmp
|
GS/res/logo-ogl.bmp
|
||||||
res/fxaa.fx
|
GS/res/fxaa.fx
|
||||||
res/glsl/common_header.glsl
|
GS/res/glsl/common_header.glsl
|
||||||
res/glsl/convert.glsl
|
GS/res/glsl/convert.glsl
|
||||||
res/glsl/interlace.glsl
|
GS/res/glsl/interlace.glsl
|
||||||
res/glsl/merge.glsl
|
GS/res/glsl/merge.glsl
|
||||||
res/glsl/shadeboost.glsl
|
GS/res/glsl/shadeboost.glsl
|
||||||
res/glsl/tfx_fs.glsl
|
GS/res/glsl/tfx_fs.glsl
|
||||||
res/glsl/tfx_vgs.glsl)
|
GS/res/glsl/tfx_vgs.glsl)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_BINARY_DIR}/pcsx2/GS/GS_res.h
|
OUTPUT ${CMAKE_BINARY_DIR}/pcsx2/GS/GS_res.h
|
||||||
|
|
Loading…
Reference in New Issue