2011-02-20 17:01:03 +00:00
|
|
|
# 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")
|
2014-07-15 23:18:59 +00:00
|
|
|
endif()
|
2011-02-20 17:01:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
# plugin name
|
2015-06-24 18:00:13 +00:00
|
|
|
set(Output GSdx-1.0.0)
|
2011-02-20 17:01:03 +00:00
|
|
|
|
|
|
|
set(CommonFlags
|
2014-04-13 08:06:28 +00:00
|
|
|
-fno-operator-names # because Xbyak uses and()/xor()/or()/not() function
|
2011-02-20 17:01:03 +00:00
|
|
|
-mfpmath=sse
|
2011-12-27 12:22:13 +00:00
|
|
|
-fno-strict-aliasing
|
2014-04-18 21:39:12 +00:00
|
|
|
-Wno-unknown-pragmas
|
|
|
|
-Wno-parentheses
|
2014-07-11 21:33:09 +00:00
|
|
|
-Wunused-variable # __dummy variable need to be investigated
|
2011-02-20 17:01:03 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
2014-12-14 13:00:20 +00:00
|
|
|
set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} -D_DEBUG)
|
2011-02-20 17:01:03 +00:00
|
|
|
|
2014-12-14 13:00:20 +00:00
|
|
|
elseif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
2015-08-08 13:25:17 +00:00
|
|
|
set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} -D_DEVEL)
|
2011-02-20 17:01:03 +00:00
|
|
|
|
2014-12-14 13:00:20 +00:00
|
|
|
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
|
2015-08-08 13:25:17 +00:00
|
|
|
set(GSdxFinalFlags ${GSdxFinalFlags} ${CommonFlags} -W)
|
2014-12-14 13:00:20 +00:00
|
|
|
|
2014-07-15 23:18:59 +00:00
|
|
|
endif()
|
2011-02-20 17:01:03 +00:00
|
|
|
|
2012-06-12 18:14:01 +00:00
|
|
|
if(XDG_STD)
|
2014-12-12 20:56:01 +00:00
|
|
|
set(GSdxFinalFlags ${GSdxFinalFlags} -DXDG_STD)
|
2014-07-15 23:18:59 +00:00
|
|
|
endif()
|
2012-06-12 18:14:01 +00:00
|
|
|
|
2015-05-11 13:33:40 +00:00
|
|
|
if(EGL_API AND EGL_FOUND)
|
|
|
|
set(GSdxFinalFlags ${GSdxFinalFlags} -DEGL_SUPPORTED)
|
|
|
|
endif()
|
|
|
|
|
2015-05-17 19:57:33 +00:00
|
|
|
if(LIBLZMA_FOUND)
|
|
|
|
set(GSdxFinalFlags ${GSdxFinalFlags} -DLZMA_SUPPORTED)
|
|
|
|
endif()
|
|
|
|
|
2015-06-04 18:22:05 +00:00
|
|
|
if(PNGPP_FOUND)
|
|
|
|
set(GSdxFinalFlags ${GSdxFinalFlags} -DPNGPP_SUPPORTED)
|
|
|
|
endif()
|
|
|
|
|
2014-12-12 20:56:01 +00:00
|
|
|
#Clang doesn't support a few common flags that GCC does.
|
|
|
|
if(NOT USE_CLANG)
|
|
|
|
set(GSdxFinalFlags ${GSdxFinalFlags} -fabi-version=6)
|
2013-07-12 21:12:34 +00:00
|
|
|
endif()
|
|
|
|
|
2011-02-20 17:01:03 +00:00
|
|
|
set(GSdxSources
|
2013-01-14 09:15:39 +00:00
|
|
|
GLLoader.cpp
|
2013-08-05 20:25:25 +00:00
|
|
|
GLState.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
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
|
2011-11-16 22:17:37 +00:00
|
|
|
GSDeviceOGL.cpp
|
2014-12-12 20:56:01 +00:00
|
|
|
GSDeviceSW.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
GSDeviceNull.cpp
|
|
|
|
GSDirtyRect.cpp
|
2015-08-06 17:14:00 +00:00
|
|
|
GSDrawingContext.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
GSDrawScanline.cpp
|
|
|
|
GSDrawScanlineCodeGenerator.cpp
|
2011-03-02 18:18:26 +00:00
|
|
|
GSDrawScanlineCodeGenerator.x86.avx.cpp
|
2014-10-26 13:36:34 +00:00
|
|
|
GSDrawScanlineCodeGenerator.x86.avx2.cpp
|
2011-03-02 18:18:26 +00:00
|
|
|
GSDrawScanlineCodeGenerator.x64.cpp
|
|
|
|
GSDrawScanlineCodeGenerator.x86.cpp
|
|
|
|
GSDrawScanlineCodeGenerator.x64.avx.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
GSDump.cpp
|
|
|
|
GSFunctionMap.cpp
|
|
|
|
GSLinuxDialog.cpp
|
|
|
|
GSLocalMemory.cpp
|
2015-05-17 13:53:03 +00:00
|
|
|
GSLzma.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
GSPerfMon.cpp
|
2015-05-16 10:33:58 +00:00
|
|
|
GSPng.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
GSRasterizer.cpp
|
|
|
|
GSRenderer.cpp
|
2014-12-01 22:06:24 +00:00
|
|
|
GSRendererCL.cpp
|
2012-01-15 17:25:49 +00:00
|
|
|
GSRendererHW.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
GSRendererNull.cpp
|
2011-11-16 22:17:37 +00:00
|
|
|
GSRendererOGL.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
GSRendererSW.cpp
|
|
|
|
GSSetting.cpp
|
|
|
|
GSSetupPrimCodeGenerator.cpp
|
2011-03-02 18:18:26 +00:00
|
|
|
GSSetupPrimCodeGenerator.x86.avx.cpp
|
2014-10-26 13:36:34 +00:00
|
|
|
GSSetupPrimCodeGenerator.x86.avx2.cpp
|
2011-03-02 18:18:26 +00:00
|
|
|
GSSetupPrimCodeGenerator.x64.avx.cpp
|
|
|
|
GSSetupPrimCodeGenerator.x86.cpp
|
|
|
|
GSSetupPrimCodeGenerator.x64.cpp
|
2013-07-06 10:08:52 +00:00
|
|
|
GSShaderOGL.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
GSState.cpp
|
|
|
|
GSTables.cpp
|
|
|
|
GSTexture.cpp
|
|
|
|
GSTextureCache.cpp
|
|
|
|
GSTextureCacheSW.cpp
|
2011-11-16 22:17:37 +00:00
|
|
|
GSTextureCacheOGL.cpp
|
2011-12-19 21:03:23 +00:00
|
|
|
GSTextureFXOGL.cpp
|
2011-11-16 22:17:37 +00:00
|
|
|
GSTextureOGL.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
GSTextureNull.cpp
|
2014-12-12 20:56:01 +00:00
|
|
|
GSTextureSW.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
GSThread.cpp
|
|
|
|
GSUtil.cpp
|
|
|
|
GSVector.cpp
|
|
|
|
GSVertexTrace.cpp
|
|
|
|
GSWnd.cpp
|
2013-01-04 11:41:51 +00:00
|
|
|
GSWndOGL.cpp
|
2013-01-17 16:58:48 +00:00
|
|
|
GSWndEGL.cpp
|
2011-02-20 17:01:03 +00:00
|
|
|
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
|
2011-11-16 22:17:37 +00:00
|
|
|
GSDeviceOGL.h
|
2011-02-20 17:01:03 +00:00
|
|
|
GSDeviceNull.h
|
|
|
|
GSDirtyRect.h
|
|
|
|
GSDrawScanline.h
|
|
|
|
GSDrawScanlineCodeGenerator.h
|
|
|
|
GSDrawingContext.h
|
|
|
|
GSDrawingEnvironment.h
|
|
|
|
GSDump.h
|
|
|
|
GSFunctionMap.h
|
2012-01-08 04:59:29 +00:00
|
|
|
GSLinuxLogo.h
|
2011-02-20 17:01:03 +00:00
|
|
|
GSLocalMemory.h
|
|
|
|
GSPerfMon.h
|
|
|
|
GSRasterizer.h
|
|
|
|
GSRenderer.h
|
|
|
|
GSRendererNull.h
|
|
|
|
GSRendererSW.h
|
2011-11-16 22:17:37 +00:00
|
|
|
GSRendererHW.h
|
|
|
|
GSRendererOGL.h
|
2011-02-20 17:01:03 +00:00
|
|
|
GSScanlineEnvironment.h
|
|
|
|
GSSetting.h
|
|
|
|
GSSetupPrimCodeGenerator.h
|
|
|
|
GSState.h
|
|
|
|
GSTables.h
|
|
|
|
GSTexture.h
|
|
|
|
GSTextureCache.h
|
|
|
|
GSTextureCacheSW.h
|
2011-11-16 22:17:37 +00:00
|
|
|
GSTextureCacheOGL.h
|
2011-02-20 17:01:03 +00:00
|
|
|
GSTextureNull.h
|
|
|
|
GSThread.h
|
|
|
|
GSUtil.h
|
|
|
|
GSVector.h
|
|
|
|
GSVertex.h
|
|
|
|
GSVertexHW.h
|
|
|
|
GSVertexList.h
|
|
|
|
GSVertexSW.h
|
|
|
|
GSVertexTrace.h
|
|
|
|
GSWnd.h
|
2013-01-04 11:41:51 +00:00
|
|
|
GSWndOGL.h
|
2013-01-17 16:58:48 +00:00
|
|
|
GSWndEGL.h
|
2011-02-20 17:01:03 +00:00
|
|
|
GSdx.h
|
2013-07-07 16:13:11 +00:00
|
|
|
res/glsl_source.h
|
2011-02-20 17:01:03 +00:00
|
|
|
stdafx.h
|
|
|
|
xbyak/xbyak.h
|
|
|
|
xbyak/xbyak_bin2hex.h
|
|
|
|
xbyak/xbyak_mnemonic.h
|
|
|
|
xbyak/xbyak_util.h
|
|
|
|
)
|
|
|
|
|
2014-08-04 16:42:40 +00:00
|
|
|
set(GSdxFinalSources
|
|
|
|
${GSdxSources}
|
|
|
|
${GSdxHeaders}
|
|
|
|
)
|
2012-01-06 21:43:39 +00:00
|
|
|
|
2014-08-04 16:42:40 +00:00
|
|
|
set(GSdxFinalLibs
|
|
|
|
${X11_LIBRARIES}
|
|
|
|
)
|
2013-07-12 21:12:34 +00:00
|
|
|
|
2015-05-11 11:24:40 +00:00
|
|
|
set(GSdxFinalLibs ${GSdxFinalLibs}
|
2015-05-16 10:33:58 +00:00
|
|
|
${OPENGL_LIBRARIES}
|
2014-08-04 16:42:40 +00:00
|
|
|
${GTK2_LIBRARIES}
|
|
|
|
${LIBC_LIBRARIES}
|
2015-05-17 19:57:33 +00:00
|
|
|
${PNG_LIBRARY}
|
2014-08-04 16:42:40 +00:00
|
|
|
)
|
2012-04-16 15:36:16 +00:00
|
|
|
|
2015-05-11 13:33:40 +00:00
|
|
|
if(EGL_API AND EGL_FOUND)
|
|
|
|
set(GSdxFinalLibs ${GSdxFinalLibs}
|
|
|
|
${EGL_LIBRARIES}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2015-05-17 19:57:33 +00:00
|
|
|
if(LIBLZMA_FOUND)
|
|
|
|
set(GSdxFinalLibs ${GSdxFinalLibs}
|
|
|
|
${LIBLZMA_LIBRARIES}
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2014-08-04 16:42:40 +00:00
|
|
|
# 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)
|
|
|
|
endif()
|
2011-07-14 09:02:37 +00:00
|
|
|
|
2014-08-04 16:42:40 +00:00
|
|
|
add_pcsx2_plugin(${Output} "${GSdxFinalSources}" "${GSdxFinalLibs}" "${GSdxFinalFlags}")
|
2012-01-08 21:59:42 +00:00
|
|
|
|
|
|
|
################################### Replay Loader
|
2012-05-01 10:54:52 +00:00
|
|
|
if(BUILD_REPLAY_LOADERS)
|
2014-12-12 20:56:01 +00:00
|
|
|
set(Replay pcsx2_GSReplayLoader)
|
2014-08-04 16:42:40 +00:00
|
|
|
set(GSdxReplayLoaderFinalSources
|
|
|
|
${GSdxFinalSources}
|
|
|
|
linux_replay.cpp
|
|
|
|
)
|
|
|
|
add_pcsx2_executable(${Replay} "${GSdxReplayLoaderFinalSources}" "${GSdxFinalLibs}" "${GSdxFinalFlags}")
|
2012-05-01 10:54:52 +00:00
|
|
|
endif(BUILD_REPLAY_LOADERS)
|