2010-06-21 11:05:30 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Dependency message print
|
|
|
|
#-------------------------------------------------------------------------------
|
2017-04-22 10:47:02 +00:00
|
|
|
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")
|
2017-05-08 07:37:13 +00:00
|
|
|
set(msg_dep_gsdx "check these libraries -> opengl, png (>=1.2), zlib (>=1.2.4), X11, liblzma")
|
2010-06-21 11:05:30 +00:00
|
|
|
|
2015-08-10 06:49:55 +00:00
|
|
|
macro(print_dep str dep)
|
|
|
|
if (PACKAGE_MODE)
|
|
|
|
message(FATAL_ERROR "${str}:${dep}")
|
|
|
|
else()
|
|
|
|
message(STATUS "${str}:${dep}")
|
|
|
|
endif()
|
|
|
|
endmacro(print_dep)
|
|
|
|
|
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
|
|
|
|
#-------------------------------------------------------------------------------
|
2014-12-22 18:31:32 +00:00
|
|
|
if (GTK2_FOUND OR GTK3_FOUND)
|
|
|
|
set(GTKn_FOUND TRUE)
|
2015-11-17 19:15:58 +00:00
|
|
|
elseif(APPLE) # Not we have but that we don't change all if(gtkn) entries
|
|
|
|
set(GTKn_FOUND TRUE)
|
2014-12-22 18:31:32 +00:00
|
|
|
else()
|
|
|
|
set(GTKn_FOUND FALSE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(SDL_FOUND OR SDL2_FOUND)
|
|
|
|
set(SDLn_FOUND TRUE)
|
|
|
|
else()
|
|
|
|
set(SDLn_FOUND FALSE)
|
|
|
|
endif()
|
2010-06-04 17:17:55 +00:00
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# Common libs
|
|
|
|
# requires: -wx
|
|
|
|
#---------------------------------------
|
2014-07-20 15:05:16 +00:00
|
|
|
if(wxWidgets_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)
|
2019-07-05 02:49:11 +00:00
|
|
|
print_dep("Skip build of common libraries: missing dependencies" "${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
|
2014-12-28 06:41:57 +00:00
|
|
|
if(wxWidgets_FOUND AND ZLIB_FOUND AND common_libs AND NOT (Linux AND NOT 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)
|
2019-07-05 02:49:11 +00:00
|
|
|
print_dep("Skip build of pcsx2 core: missing dependencies" "${msg_dep_pcsx2}")
|
2012-12-13 16:11:53 +00:00
|
|
|
endif()
|
2015-11-17 19:09:33 +00:00
|
|
|
# Linux, BSD, use gtk2, but not OSX
|
|
|
|
if(UNIX AND pcsx2_core AND NOT GTKn_FOUND AND NOT APPLE)
|
2010-06-04 17:17:55 +00:00
|
|
|
set(pcsx2_core FALSE)
|
2019-07-05 02:49:11 +00:00
|
|
|
print_dep("Skip build of pcsx2 core: missing dependencies" "${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.
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
2016-10-26 17:18:42 +00:00
|
|
|
|
2011-02-20 17:01:03 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# GSdx
|
|
|
|
#---------------------------------------
|
|
|
|
# requires: -OpenGL
|
2016-02-21 09:59:49 +00:00
|
|
|
# -PNG
|
|
|
|
# -X11
|
|
|
|
# -zlib
|
2011-02-20 17:01:03 +00:00
|
|
|
#---------------------------------------
|
2020-04-09 09:32:07 +00:00
|
|
|
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))
|
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")
|
2015-05-16 10:33:58 +00:00
|
|
|
set(GSdx FALSE)
|
2014-04-17 18:24:12 +00:00
|
|
|
else()
|
2015-05-16 10:33:58 +00:00
|
|
|
set(GSdx FALSE)
|
2019-07-05 02:49:11 +00:00
|
|
|
print_dep("Skip build of GSdx: missing dependencies" "${msg_dep_gsdx}")
|
2014-04-17 18:24:12 +00:00
|
|
|
endif()
|
2011-02-20 17:01:03 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
2020-05-07 15:31:48 +00:00
|
|
|
#-------------------------------------------------------------------------------
|