mirror of https://github.com/PCSX2/pcsx2.git
cmake: add GSdx compilation (based on codeblock)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4327 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
3c607da90c
commit
870da347be
|
@ -5,6 +5,7 @@ set(msg_dep_common_libs "check these libraries -> wxWidgets (>=2.8.10), sparseha
|
|||
set(msg_dep_pcsx2 "check these libraries -> wxWidgets (>=2.8.10), gtk2 (>=2.16), zlib (>=1.2.4), pcsx2 common libs")
|
||||
set(msg_dep_cdvdiso "check these libraries -> bzip2 (>=1.0.5)")
|
||||
set(msg_dep_zerogs "check these libraries -> glew (>=1.5), opengl, X11, nvidia-cg-toolkit (>=2.1)")
|
||||
set(msg_dep_gsdx "check these libraries -> opengl, X11")
|
||||
set(msg_dep_zzogl "check these libraries -> glew (>=1.5), jpeg (>=6.2), opengl, X11, nvidia-cg-toolkit (>=2.1), pcsx2 common libs")
|
||||
set(msg_dep_onepad "check these libraries -> sdl (>=1.2)")
|
||||
set(msg_dep_zeropad "check these libraries -> sdl (>=1.2)")
|
||||
|
@ -104,6 +105,21 @@ set(FWnull TRUE)
|
|||
set(GSnull TRUE)
|
||||
#---------------------------------------
|
||||
|
||||
#---------------------------------------
|
||||
# GSdx
|
||||
#---------------------------------------
|
||||
# requires: -OpenGL
|
||||
# -X11
|
||||
#---------------------------------------
|
||||
if(OPENGL_FOUND AND X11_FOUND)
|
||||
set(GSdx TRUE)
|
||||
else(OPENGL_FOUND AND X11_FOUND)
|
||||
set(GSdx FALSE)
|
||||
message(STATUS "Skip build of GSdx: miss some dependencies")
|
||||
message(STATUS "${msg_dep_gsdx}")
|
||||
endif(OPENGL_FOUND AND X11_FOUND)
|
||||
#---------------------------------------
|
||||
|
||||
#---------------------------------------
|
||||
# zerogs
|
||||
#---------------------------------------
|
||||
|
@ -225,7 +241,6 @@ set(cdvdGigaherz FALSE)
|
|||
set(CDVDisoEFP FALSE)
|
||||
set(CDVDolio FALSE)
|
||||
set(CDVDpeops FALSE)
|
||||
set(GSdx FALSE)
|
||||
set(LilyPad FALSE)
|
||||
set(PeopsSPU2 FALSE)
|
||||
set(SSSPSXPAD FALSE)
|
||||
|
|
|
@ -52,9 +52,9 @@ if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/FWnull" AND FWnull)
|
|||
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/FWnull" AND FWnull)
|
||||
|
||||
# make GSdx
|
||||
#if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/GSdx" AND GSdx)
|
||||
# add_subdirectory(GSdx)
|
||||
#endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/GSdx" AND GSdx)
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/GSdx" AND GSdx)
|
||||
add_subdirectory(GSdx)
|
||||
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/GSdx" AND GSdx)
|
||||
|
||||
# make GSnull
|
||||
if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/GSnull" AND GSnull)
|
||||
|
|
|
@ -0,0 +1,174 @@
|
|||
# Check that people use the good file
|
||||
if(NOT TOP_CMAKE_WAS_SOURCED)
|
||||
message(FATAL_ERROR "
|
||||
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
|
||||
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
|
||||
endif(NOT TOP_CMAKE_WAS_SOURCED)
|
||||
|
||||
|
||||
# plugin name
|
||||
set(Output GSdx)
|
||||
|
||||
set(CommonFlags
|
||||
-D_LINUX
|
||||
-pthread
|
||||
-fno-operator-names
|
||||
-mpreferred-stack-boundary=2
|
||||
-mfpmath=sse
|
||||
-Wstrict-aliasing # Allow to track strict aliasing issue.
|
||||
-Wno-format
|
||||
-Wno-unused-parameter
|
||||
-Wno-unused-value
|
||||
-Wunused-variable
|
||||
)
|
||||
|
||||
set(OptimizationFlags
|
||||
-O2
|
||||
-DNDEBUG
|
||||
)
|
||||
|
||||
# Debug - Build
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
# add defines
|
||||
add_definitions(${CommonFlags} -g -Wall)
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
|
||||
# Devel - Build
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||
# add defines
|
||||
add_definitions(${CommonFlags} ${OptimizationFlags} -g -W)
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
||||
|
||||
# Release - Build
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
# add defines
|
||||
add_definitions(${CommonFlags} ${OptimizationFlags} -W)
|
||||
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
|
||||
set(GSdxSources
|
||||
GPU.cpp
|
||||
GPUDrawScanline.cpp
|
||||
GPUDrawScanlineCodeGenerator.cpp
|
||||
GPULocalMemory.cpp
|
||||
GPURenderer.cpp
|
||||
GPURendererSW.cpp
|
||||
GPUSetupPrimCodeGenerator.cpp
|
||||
GPUState.cpp
|
||||
GS.cpp
|
||||
GSAlignedClass.cpp
|
||||
GSBlock.cpp
|
||||
GSCapture.cpp
|
||||
GSClut.cpp
|
||||
GSCodeBuffer.cpp
|
||||
GSCrc.cpp
|
||||
GSDevice.cpp
|
||||
GSDeviceNull.cpp
|
||||
GSDirtyRect.cpp
|
||||
GSDrawScanline.cpp
|
||||
GSDrawScanlineCodeGenerator.cpp
|
||||
GSDump.cpp
|
||||
GSFunctionMap.cpp
|
||||
GSLinuxDialog.cpp
|
||||
GSLocalMemory.cpp
|
||||
GSPerfMon.cpp
|
||||
GSRasterizer.cpp
|
||||
GSRenderer.cpp
|
||||
GSRendererNull.cpp
|
||||
GSRendererSW.cpp
|
||||
GSSetting.cpp
|
||||
GSSetupPrimCodeGenerator.cpp
|
||||
GSState.cpp
|
||||
GSTables.cpp
|
||||
GSTexture.cpp
|
||||
GSTextureCache.cpp
|
||||
GSTextureCacheSW.cpp
|
||||
GSTextureNull.cpp
|
||||
GSThread.cpp
|
||||
GSUtil.cpp
|
||||
GSVector.cpp
|
||||
GSVertexTrace.cpp
|
||||
GSWnd.cpp
|
||||
GSdx.cpp
|
||||
stdafx.cpp
|
||||
)
|
||||
|
||||
set(GSdxHeaders
|
||||
GPU.h
|
||||
GPUDrawScanline.h
|
||||
GPUDrawScanlineCodeGenerator.h
|
||||
GPUDrawingEnvironment.h
|
||||
GPULocalMemory.h
|
||||
GPURenderer.h
|
||||
GPURendererSW.h
|
||||
GPUScanlineEnvironment.h
|
||||
GPUSetupPrimCodeGenerator.h
|
||||
GPUState.h
|
||||
GPUVertex.h
|
||||
GS.h
|
||||
GSAlignedClass.h
|
||||
GSBlock.h
|
||||
GSCapture.h
|
||||
GSClut.h
|
||||
GSCodeBuffer.h
|
||||
GSCrc.h
|
||||
GSDevice.h
|
||||
GSDeviceNull.h
|
||||
GSDirtyRect.h
|
||||
GSDrawScanline.h
|
||||
GSDrawScanlineCodeGenerator.h
|
||||
GSDrawingContext.h
|
||||
GSDrawingEnvironment.h
|
||||
GSDump.h
|
||||
GSFunctionMap.h
|
||||
GSLocalMemory.h
|
||||
GSPerfMon.h
|
||||
GSRasterizer.h
|
||||
GSRenderer.h
|
||||
GSRendererNull.h
|
||||
GSRendererSW.h
|
||||
GSScanlineEnvironment.h
|
||||
GSSetting.h
|
||||
GSSetupPrimCodeGenerator.h
|
||||
GSState.h
|
||||
GSTables.h
|
||||
GSTexture.h
|
||||
GSTextureCache.h
|
||||
GSTextureCacheSW.h
|
||||
GSTextureNull.h
|
||||
GSThread.h
|
||||
GSUtil.h
|
||||
GSVector.h
|
||||
GSVertex.h
|
||||
GSVertexHW.h
|
||||
GSVertexList.h
|
||||
GSVertexSW.h
|
||||
GSVertexTrace.h
|
||||
GSWnd.h
|
||||
GSdx.h
|
||||
stdafx.h
|
||||
xbyak/xbyak.h
|
||||
xbyak/xbyak_bin2hex.h
|
||||
xbyak/xbyak_mnemonic.h
|
||||
xbyak/xbyak_util.h
|
||||
)
|
||||
|
||||
# add additional include directories
|
||||
include_directories(.)
|
||||
|
||||
# add library
|
||||
add_library(${Output} SHARED
|
||||
${GSdxSources}
|
||||
${GSdxHeaders}
|
||||
)
|
||||
|
||||
# set output directory
|
||||
set_target_properties(${Output} PROPERTIES
|
||||
LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin/plugins)
|
||||
|
||||
# link target with X11
|
||||
target_link_libraries(${Output} ${X11_LIBRARIES})
|
||||
|
||||
# User flags options
|
||||
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
|
||||
target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
|
||||
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
|
Loading…
Reference in New Issue