2010-06-21 11:05:30 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Dependency message print
|
|
|
|
#-------------------------------------------------------------------------------
|
2013-05-01 16:02:11 +00:00
|
|
|
set(msg_dep_common_libs "check these libraries -> wxWidgets (>=2.8.10), sparsehash (>=1.5), aio")
|
2010-06-21 11:05:30 +00:00
|
|
|
set(msg_dep_pcsx2 "check these libraries -> wxWidgets (>=2.8.10), gtk2 (>=2.16), zlib (>=1.2.4), pcsx2 common libs")
|
2011-05-14 11:03:02 +00:00
|
|
|
set(msg_dep_cdvdiso "check these libraries -> bzip2 (>=1.0.5), gtk2 (>=2.16)")
|
2012-08-15 10:22:19 +00:00
|
|
|
set(msg_dep_zerogs "check these libraries -> glew (>=1.6), opengl, X11, nvidia-cg-toolkit (>=2.1)")
|
2013-06-16 08:43:50 +00:00
|
|
|
set(msg_dep_gsdx "check these libraries -> opengl, egl, X11")
|
2013-10-05 10:37:48 +00:00
|
|
|
set(msg_dep_onepad "check these libraries -> sdl (==1.2)")
|
|
|
|
set(msg_dep_spu2x "check these libraries -> soundtouch (>=1.5), alsa, portaudio (>=1.9), sdl (==1.2) pcsx2 common libs")
|
2010-06-21 11:05:30 +00:00
|
|
|
set(msg_dep_zerospu2 "check these libraries -> soundtouch (>=1.5), alsa")
|
2012-05-01 10:54:52 +00:00
|
|
|
if(GLSL_API)
|
2012-08-15 10:22:19 +00:00
|
|
|
set(msg_dep_zzogl "check these libraries -> glew (>=1.6), jpeg (>=6.2), opengl, X11, pcsx2 common libs")
|
2012-05-01 10:54:52 +00:00
|
|
|
else(GLSL_API)
|
2012-08-15 10:22:19 +00:00
|
|
|
set(msg_dep_zzogl "check these libraries -> glew (>=1.6), jpeg (>=6.2), opengl, X11, nvidia-cg-toolkit (>=2.1), pcsx2 common libs")
|
2014-04-17 18:24:12 +00:00
|
|
|
endif()
|
2010-06-21 11:05:30 +00:00
|
|
|
|
2010-06-04 17:17:55 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Pcsx2 core & common libs
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Check for additional dependencies.
|
|
|
|
# If all dependencies are available, including OS, build it
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# Common libs
|
|
|
|
# requires: -wx
|
2010-06-21 11:05:30 +00:00
|
|
|
# -sparsehash
|
2010-06-04 17:17:55 +00:00
|
|
|
#---------------------------------------
|
2010-06-21 11:05:30 +00:00
|
|
|
if(wxWidgets_FOUND AND SPARSEHASH_FOUND)
|
2010-06-04 17:17:55 +00:00
|
|
|
set(common_libs TRUE)
|
2014-03-30 14:28:59 +00:00
|
|
|
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/common/src")
|
2012-05-07 16:29:06 +00:00
|
|
|
set(common_libs FALSE)
|
2014-04-17 18:24:12 +00:00
|
|
|
else()
|
2010-06-04 17:17:55 +00:00
|
|
|
set(common_libs FALSE)
|
|
|
|
message(STATUS "Skip build of common libraries: miss some dependencies")
|
2010-06-21 11:05:30 +00:00
|
|
|
message(STATUS "${msg_dep_common_libs}")
|
2014-04-17 18:24:12 +00:00
|
|
|
endif()
|
2010-06-04 17:17:55 +00:00
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# Pcsx2 core
|
|
|
|
# requires: -wx
|
|
|
|
# -gtk2 (linux)
|
|
|
|
# -zlib
|
|
|
|
# -common_libs
|
2012-12-13 16:11:53 +00:00
|
|
|
# -aio
|
2010-06-04 17:17:55 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# Common dependancy
|
2012-12-13 16:11:53 +00:00
|
|
|
if(wxWidgets_FOUND AND ZLIB_FOUND AND common_libs AND AIO_FOUND)
|
2010-06-04 17:17:55 +00:00
|
|
|
set(pcsx2_core TRUE)
|
2014-03-30 14:28:59 +00:00
|
|
|
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/pcsx2")
|
2012-05-07 16:29:06 +00:00
|
|
|
set(pcsx2_core FALSE)
|
2012-12-13 16:11:53 +00:00
|
|
|
else()
|
2010-06-04 17:17:55 +00:00
|
|
|
set(pcsx2_core FALSE)
|
|
|
|
message(STATUS "Skip build of pcsx2 core: miss some dependencies")
|
2010-06-21 11:05:30 +00:00
|
|
|
message(STATUS "${msg_dep_pcsx2}")
|
2012-12-13 16:11:53 +00:00
|
|
|
endif()
|
2010-06-04 17:17:55 +00:00
|
|
|
# Linux need also gtk2
|
2012-05-07 16:29:06 +00:00
|
|
|
if(Linux AND pcsx2_core AND NOT GTK2_FOUND)
|
2010-06-04 17:17:55 +00:00
|
|
|
set(pcsx2_core FALSE)
|
|
|
|
message(STATUS "Skip build of pcsx2 core: miss some dependencies")
|
2010-06-21 11:05:30 +00:00
|
|
|
message(STATUS "${msg_dep_pcsx2}")
|
2012-12-13 16:11:53 +00:00
|
|
|
endif()
|
2010-06-04 17:17:55 +00:00
|
|
|
|
|
|
|
|
2010-06-03 17:28:20 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Plugins
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Check all plugins for additional dependencies.
|
|
|
|
# If all dependencies of a plugin are available, including OS, the plugin will
|
|
|
|
# be build.
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# CDVDnull
|
|
|
|
#---------------------------------------
|
2011-10-31 10:25:24 +00:00
|
|
|
if(GTK2_FOUND)
|
|
|
|
set(CDVDnull TRUE)
|
2014-04-17 18:24:12 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# CDVDiso
|
|
|
|
#---------------------------------------
|
|
|
|
# requires: -BZip2
|
2011-05-14 11:03:02 +00:00
|
|
|
# -gtk2 (linux)
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
2014-04-17 18:24:12 +00:00
|
|
|
if(EXTRA_PLUGINS)
|
|
|
|
if(BZIP2_FOUND AND GTK2_FOUND)
|
|
|
|
set(CDVDiso TRUE)
|
|
|
|
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/CDVDiso")
|
|
|
|
set(CDVDiso FALSE)
|
|
|
|
else()
|
|
|
|
set(CDVDiso FALSE)
|
|
|
|
message(STATUS "Skip build of CDVDiso: miss some dependencies")
|
|
|
|
message(STATUS "${msg_dep_cdvdiso}")
|
|
|
|
endif()
|
2014-04-10 07:20:42 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
|
2010-08-17 14:39:58 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# CDVDlinuz
|
|
|
|
#---------------------------------------
|
2014-04-10 07:20:42 +00:00
|
|
|
if(EXTRA_PLUGINS)
|
2014-04-17 18:24:12 +00:00
|
|
|
set(CDVDlinuz TRUE)
|
2014-04-10 07:20:42 +00:00
|
|
|
endif()
|
2010-08-17 14:39:58 +00:00
|
|
|
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# dev9null
|
|
|
|
#---------------------------------------
|
2011-10-31 10:25:24 +00:00
|
|
|
if(GTK2_FOUND)
|
|
|
|
set(dev9null TRUE)
|
2014-04-17 18:24:12 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# FWnull
|
|
|
|
#---------------------------------------
|
2011-10-31 10:25:24 +00:00
|
|
|
if(GTK2_FOUND)
|
|
|
|
set(FWnull TRUE)
|
2014-04-17 18:24:12 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# GSnull
|
|
|
|
#---------------------------------------
|
2014-04-10 07:20:42 +00:00
|
|
|
if(GTK2_FOUND AND EXTRA_PLUGINS)
|
2011-10-31 10:25:24 +00:00
|
|
|
set(GSnull TRUE)
|
2014-04-10 07:20:42 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
2011-02-20 17:01:03 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# GSdx
|
|
|
|
#---------------------------------------
|
|
|
|
# requires: -OpenGL
|
|
|
|
# -X11
|
|
|
|
#---------------------------------------
|
2013-06-16 08:43:50 +00:00
|
|
|
if(OPENGL_FOUND AND X11_FOUND AND EGL_FOUND)
|
2011-02-20 17:01:03 +00:00
|
|
|
set(GSdx TRUE)
|
2014-03-30 14:28:59 +00:00
|
|
|
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/GSdx")
|
2012-05-07 16:29:06 +00:00
|
|
|
set(GSdx FALSE)
|
2014-04-17 18:24:12 +00:00
|
|
|
else()
|
2011-02-20 17:01:03 +00:00
|
|
|
set(GSdx FALSE)
|
|
|
|
message(STATUS "Skip build of GSdx: miss some dependencies")
|
|
|
|
message(STATUS "${msg_dep_gsdx}")
|
2014-04-17 18:24:12 +00:00
|
|
|
endif()
|
2011-02-20 17:01:03 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# zerogs
|
|
|
|
#---------------------------------------
|
|
|
|
# requires: -GLEW
|
|
|
|
# -OpenGL
|
|
|
|
# -X11
|
|
|
|
# -CG
|
|
|
|
#---------------------------------------
|
2014-04-17 18:24:12 +00:00
|
|
|
if(EXTRA_PLUGINS)
|
|
|
|
if(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
|
|
|
|
set(zerogs TRUE)
|
|
|
|
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerogs")
|
|
|
|
set(zerogs FALSE)
|
|
|
|
else()
|
|
|
|
set(zerogs FALSE)
|
|
|
|
message(STATUS "Skip build of zerogs: miss some dependencies")
|
|
|
|
message(STATUS "${msg_dep_zerogs}")
|
|
|
|
endif()
|
2014-04-10 07:20:42 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# zzogl-pg
|
|
|
|
#---------------------------------------
|
|
|
|
# requires: -GLEW
|
|
|
|
# -OpenGL
|
|
|
|
# -X11
|
2012-04-19 21:22:08 +00:00
|
|
|
# -CG (only with cg build
|
2010-06-23 10:07:18 +00:00
|
|
|
# -JPEG
|
2010-06-04 17:17:55 +00:00
|
|
|
# -common_libs
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
2012-04-19 21:22:08 +00:00
|
|
|
if((GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND JPEG_FOUND AND common_libs) AND (CG_FOUND OR GLSL_API))
|
2010-06-03 17:28:20 +00:00
|
|
|
set(zzogl TRUE)
|
2014-04-10 07:20:42 +00:00
|
|
|
if(CG_FOUND AND NOT GLSL_API AND EXTRA_PLUGINS)
|
2012-05-01 10:54:52 +00:00
|
|
|
set(zzoglcg TRUE)
|
2014-04-10 07:20:42 +00:00
|
|
|
else()
|
2012-05-01 10:54:52 +00:00
|
|
|
set(zzoglcg FALSE)
|
2014-04-10 07:20:42 +00:00
|
|
|
endif()
|
2014-03-30 14:28:59 +00:00
|
|
|
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/zzogl-pg")
|
2012-05-07 16:29:06 +00:00
|
|
|
set(zzogl FALSE)
|
|
|
|
set(zzoglcg FALSE)
|
|
|
|
set(REBUILD_SHADER FALSE)
|
2014-04-10 07:20:42 +00:00
|
|
|
else()
|
2010-06-03 17:28:20 +00:00
|
|
|
set(zzogl FALSE)
|
2012-05-01 10:54:52 +00:00
|
|
|
set(zzoglcg FALSE)
|
|
|
|
set(REBUILD_SHADER FALSE)
|
2010-06-03 17:28:20 +00:00
|
|
|
message(STATUS "Skip build of zzogl: miss some dependencies")
|
2010-06-21 11:05:30 +00:00
|
|
|
message(STATUS "${msg_dep_zzogl}")
|
2014-04-10 07:20:42 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# PadNull
|
|
|
|
#---------------------------------------
|
2014-04-10 07:20:42 +00:00
|
|
|
if(GTK2_FOUND AND EXTRA_PLUGINS)
|
2011-10-31 10:25:24 +00:00
|
|
|
set(PadNull TRUE)
|
2014-04-10 07:20:42 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# onepad
|
|
|
|
#---------------------------------------
|
|
|
|
# requires: -SDL
|
|
|
|
#---------------------------------------
|
|
|
|
if(SDL_FOUND)
|
|
|
|
set(onepad TRUE)
|
2014-03-30 14:28:59 +00:00
|
|
|
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/onepad")
|
2012-05-07 16:29:06 +00:00
|
|
|
set(onepad FALSE)
|
2014-04-17 18:24:12 +00:00
|
|
|
else()
|
2010-06-03 17:28:20 +00:00
|
|
|
set(onepad FALSE)
|
|
|
|
message(STATUS "Skip build of onepad: miss some dependencies")
|
2010-06-21 11:05:30 +00:00
|
|
|
message(STATUS "${msg_dep_onepad}")
|
2014-04-17 18:24:12 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# SPU2null
|
|
|
|
#---------------------------------------
|
2014-04-10 07:20:42 +00:00
|
|
|
if(GTK2_FOUND AND EXTRA_PLUGINS)
|
2011-10-31 10:25:24 +00:00
|
|
|
set(SPU2null TRUE)
|
2014-04-10 07:20:42 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# spu2-x
|
|
|
|
#---------------------------------------
|
|
|
|
# requires: -SoundTouch
|
|
|
|
# -ALSA
|
|
|
|
# -Portaudio
|
2013-10-05 10:37:48 +00:00
|
|
|
# -SDL
|
2010-06-04 17:17:55 +00:00
|
|
|
# -common_libs
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
2013-10-05 10:37:48 +00:00
|
|
|
if(ALSA_FOUND AND PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND AND SDL_FOUND AND common_libs)
|
2010-06-03 17:28:20 +00:00
|
|
|
set(spu2-x TRUE)
|
2014-03-30 14:28:59 +00:00
|
|
|
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/spu2-x")
|
2012-05-07 16:29:06 +00:00
|
|
|
set(spu2-x FALSE)
|
2013-10-05 10:37:48 +00:00
|
|
|
else()
|
2010-06-03 17:28:20 +00:00
|
|
|
set(spu2-x FALSE)
|
|
|
|
message(STATUS "Skip build of spu2-x: miss some dependencies")
|
2010-06-21 11:05:30 +00:00
|
|
|
message(STATUS "${msg_dep_spu2x}")
|
2013-10-05 10:37:48 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# zerospu2
|
|
|
|
#---------------------------------------
|
|
|
|
# requires: -SoundTouch
|
|
|
|
# -ALSA
|
|
|
|
# -PortAudio
|
|
|
|
#---------------------------------------
|
2014-04-17 18:24:12 +00:00
|
|
|
if(EXTRA_PLUGINS)
|
|
|
|
if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerospu2" AND SOUNDTOUCH_FOUND AND ALSA_FOUND)
|
|
|
|
set(zerospu2 TRUE)
|
|
|
|
# Comment the next line, if you want to compile zerospu2
|
|
|
|
set(zerospu2 FALSE)
|
|
|
|
message(STATUS "Don't build zerospu2. It is super-seeded by spu2x")
|
|
|
|
elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/zerospu2")
|
|
|
|
set(zerospu2 FALSE)
|
|
|
|
else()
|
|
|
|
set(zerospu2 FALSE)
|
|
|
|
message(STATUS "Skip build of zerospu2: miss some dependencies")
|
|
|
|
message(STATUS "${msg_dep_zerospu2}")
|
|
|
|
endif()
|
2014-04-10 07:20:42 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# USBnull
|
|
|
|
#---------------------------------------
|
2011-10-31 10:25:24 +00:00
|
|
|
if(GTK2_FOUND)
|
|
|
|
set(USBnull TRUE)
|
2014-04-17 18:24:12 +00:00
|
|
|
endif()
|
2010-06-03 17:28:20 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# [TODO] Write CMakeLists.txt for these plugins.
|
|
|
|
set(cdvdGigaherz FALSE)
|
|
|
|
set(CDVDisoEFP FALSE)
|
|
|
|
set(CDVDolio FALSE)
|
|
|
|
set(CDVDpeops FALSE)
|
|
|
|
set(LilyPad FALSE)
|
|
|
|
set(PeopsSPU2 FALSE)
|
|
|
|
set(SSSPSXPAD FALSE)
|
|
|
|
set(xpad FALSE)
|
|
|
|
#-------------------------------------------------------------------------------
|