2010-01-21 15:12:50 +00:00
|
|
|
# Search for additional software.
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Minmal required version of libraries
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
set(minimal_wxWidgets_version 2.8.0)
|
|
|
|
set(minimal_GTK2_version 2.10)
|
|
|
|
set(minimal_SDL_version 1.2)
|
|
|
|
|
|
|
|
# to set the proper dependencies and decide which plugins should be build we
|
|
|
|
# need to know on which OS we are currenty working/running
|
|
|
|
detectOperatingSystem()
|
|
|
|
|
2010-05-05 11:17:08 +00:00
|
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS " ")
|
|
|
|
SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS " ")
|
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# FindStuff
|
|
|
|
#-------------------------------------------------------------------------------
|
2010-01-22 04:36:49 +00:00
|
|
|
#----------------------------------------
|
|
|
|
# Required
|
|
|
|
#----------------------------------------
|
|
|
|
if(Linux) # Linux only
|
2010-01-21 15:12:50 +00:00
|
|
|
# gtk required
|
|
|
|
find_package(GTK2 REQUIRED gtk)
|
|
|
|
|
|
|
|
# gtk found
|
|
|
|
if(GTK2_FOUND)
|
|
|
|
# add gtk include directories
|
|
|
|
include_directories(${GTK2_INCLUDE_DIRS})
|
|
|
|
#else(GTK2_FOUND)
|
|
|
|
# message(FATAL_ERROR "GTK2 libraries and include files not found.
|
2010-01-22 04:36:49 +00:00
|
|
|
# Please install GTK2 version ${minimal_GTK2_version} or higher.")
|
2010-01-21 15:12:50 +00:00
|
|
|
endif(GTK2_FOUND)
|
2010-01-22 04:36:49 +00:00
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
endif(Linux)
|
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
|
|
|
# wx required
|
|
|
|
find_package(wxWidgets REQUIRED base core adv)
|
|
|
|
|
|
|
|
# wx found
|
|
|
|
if(wxWidgets_FOUND)
|
2010-05-16 00:36:42 +00:00
|
|
|
if(Linux) # Linux only
|
|
|
|
# Force the use of 32 bit library
|
|
|
|
STRING(REGEX REPLACE "/usr/lib/wx" "${32_LD_LIBRARY_PATH}/wx"
|
|
|
|
wxWidgets_INCLUDE_DIRS "${wxWidgets_INCLUDE_DIRS}")
|
|
|
|
endif(Linux)
|
2010-01-21 15:12:50 +00:00
|
|
|
include(${wxWidgets_USE_FILE})
|
|
|
|
#else(wxWidgets_FOUND)
|
|
|
|
# message(FATAL_ERROR "wxWidgets libraries and include files not found.\
|
|
|
|
# Please install wxWidgets version ${minimal_wxWidgets_version} \
|
|
|
|
# or higher.")
|
|
|
|
endif(wxWidgets_FOUND)
|
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# zlib required (no require flag, because we can use project one as fallback)
|
2010-01-21 15:12:50 +00:00
|
|
|
find_package(ZLIB)
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# if we found zlib on the system, use it else use project one
|
2010-05-23 07:51:43 +00:00
|
|
|
if(ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB)
|
2010-05-12 11:25:30 +00:00
|
|
|
# add zlib include directories
|
|
|
|
include_directories(${ZLIB_INCLUDE_DIRS})
|
2010-05-23 07:51:43 +00:00
|
|
|
else(ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB)
|
2010-01-22 04:36:49 +00:00
|
|
|
# use project one
|
|
|
|
set(projectZLIB TRUE)
|
2010-05-23 07:51:43 +00:00
|
|
|
endif(ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
|
|
|
|
#----------------------------------------
|
|
|
|
# Optional
|
|
|
|
#----------------------------------------
|
|
|
|
if(Linux) # Linux only
|
|
|
|
# x11 optional
|
|
|
|
find_package(X11)
|
|
|
|
|
|
|
|
# x11 found
|
|
|
|
if(X11_FOUND)
|
|
|
|
# add x11 include directories
|
|
|
|
include_directories(${X11_INCLUDE_DIR})
|
|
|
|
#else(X11_FOUND)
|
|
|
|
# message(FATAL_ERROR "X11 libraries and include files not found.
|
|
|
|
# Please install X11.")
|
|
|
|
endif(X11_FOUND)
|
|
|
|
endif(Linux)
|
|
|
|
|
2010-05-04 10:17:47 +00:00
|
|
|
# Manually find Xxf86vm because it is not done in the module...
|
|
|
|
FIND_LIBRARY(X11_Xxf86vm_LIB Xxf86vm ${X11_LIB_SEARCH_PATH})
|
|
|
|
MARK_AS_ADVANCED(X11_Xxf86vm_LIB)
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
#------------------------------------------------------------
|
|
|
|
|
2010-05-23 07:51:43 +00:00
|
|
|
# A52 optional
|
|
|
|
include(FindA52)
|
|
|
|
|
|
|
|
# if we found A52 on the system,
|
|
|
|
# use it else use project one
|
|
|
|
if(A52_FOUND AND NOT FORCE_INTERNAL_A52)
|
|
|
|
# add a52 include directories
|
|
|
|
include_directories(${A52_INCLUDE_DIR})
|
|
|
|
else(A52_FOUND AND NOT FORCE_INTERNAL_A52)
|
|
|
|
# use project one
|
|
|
|
set(projectA52 TRUE)
|
|
|
|
set(A52_LIBRARIES A52)
|
|
|
|
endif(A52_FOUND AND NOT FORCE_INTERNAL_A52)
|
|
|
|
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# ALSA optional
|
|
|
|
find_package(ALSA)
|
|
|
|
|
|
|
|
# ALSA found
|
|
|
|
if(ALSA_FOUND)
|
|
|
|
# add ALSA include directories
|
|
|
|
include_directories(${ALSA_INCLUDE_DIRS})
|
|
|
|
endif(ALSA_FOUND)
|
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
# bzip2 optional
|
|
|
|
find_package(BZip2)
|
|
|
|
|
|
|
|
# if we found bzip2 on the system,
|
2010-01-22 04:36:49 +00:00
|
|
|
# use it else use project one
|
2010-05-23 07:51:43 +00:00
|
|
|
if(BZIP2_FOUND AND NOT FORCE_INTERNAL_BZIP2)
|
2010-05-12 11:25:30 +00:00
|
|
|
# add zlib include directories
|
|
|
|
include_directories(${BZIP2_INCLUDE_DIR})
|
2010-05-23 07:51:43 +00:00
|
|
|
else(BZIP2_FOUND AND NOT FORCE_INTERNAL_BZIP2)
|
2010-01-22 04:36:49 +00:00
|
|
|
# use project one
|
|
|
|
set(projectBZip2 TRUE)
|
2010-05-23 07:51:43 +00:00
|
|
|
set(BZIP2_LIBRARIES bzip2)
|
|
|
|
endif(BZIP2_FOUND AND NOT FORCE_INTERNAL_BZIP2)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# Cg optional
|
2010-05-15 23:36:13 +00:00
|
|
|
include(FindCg)
|
2010-01-22 04:36:49 +00:00
|
|
|
|
|
|
|
# found Cg
|
|
|
|
if(CG_FOUND)
|
|
|
|
# add Cg include directories
|
|
|
|
include_directories(${CG_INCLUDE_DIR})
|
|
|
|
endif(CG_FOUND)
|
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
|
|
|
# GLEW optional
|
2010-05-15 23:36:13 +00:00
|
|
|
include(FindGlew)
|
2010-01-22 04:36:49 +00:00
|
|
|
|
|
|
|
# found GLEW
|
|
|
|
if(GLEW_FOUND)
|
|
|
|
# add GLEW include directories
|
|
|
|
include_directories(${GLEW_INCLUDE_PATH})
|
|
|
|
endif(GLEW_FOUND)
|
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
# OpenGL optional
|
|
|
|
find_package(OpenGL)
|
|
|
|
|
|
|
|
# opengl found
|
|
|
|
if(OPENGL_FOUND)
|
|
|
|
# add OpenGL include directories
|
|
|
|
include_directories(${OPENGL_INCLUDE_DIR})
|
|
|
|
endif(OPENGL_FOUND)
|
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# PortAudio optional
|
2010-05-15 23:36:13 +00:00
|
|
|
include(FindPortAudio)
|
2010-01-22 04:36:49 +00:00
|
|
|
|
|
|
|
# found PortAudio
|
|
|
|
if(PORTAUDIO_FOUND)
|
|
|
|
# add PortAudio include directories
|
|
|
|
include_directories(${PORTAUDIO_INCLUDE_DIR})
|
|
|
|
endif(PORTAUDIO_FOUND)
|
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
# SDL optional
|
2010-05-04 10:17:47 +00:00
|
|
|
set(SDL_BUILDING_LIBRARY TRUE)
|
2010-01-21 15:12:50 +00:00
|
|
|
find_package(SDL)
|
|
|
|
|
|
|
|
# SDL found
|
|
|
|
if(SDL_FOUND)
|
|
|
|
# add SDL include directories
|
|
|
|
include_directories(${SDL_INCLUDE_DIR})
|
|
|
|
endif(SDL_FOUND)
|
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# SoundTouch optional
|
2010-05-15 23:36:13 +00:00
|
|
|
#include(FindSoundTouch)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
|
|
|
# found SoundTouch
|
2010-05-23 07:51:43 +00:00
|
|
|
if(SOUNDTOUCH_FOUND AND NOT FORCE_INTERNAL_SOUNDTOUCH)
|
|
|
|
# add SoundTouch include directories
|
|
|
|
include_directories(${SOUNDTOUCH_INCLUDE_DIR})
|
|
|
|
else(SOUNDTOUCH_FOUND AND NOT FORCE_INTERNAL_SOUNDTOUCH)
|
2010-01-22 04:36:49 +00:00
|
|
|
# use project one
|
|
|
|
set(projectSoundTouch TRUE)
|
2010-05-23 07:51:43 +00:00
|
|
|
set(SOUNDTOUCH_LIBRARIES SoundTouch)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
|
|
|
# found
|
|
|
|
set(SOUNDTOUCH_FOUND TRUE)
|
2010-05-23 07:51:43 +00:00
|
|
|
endif(SOUNDTOUCH_FOUND AND NOT FORCE_INTERNAL_SOUNDTOUCH)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
|
|
|
#------------------------------------------------------------
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# Subversion optional
|
|
|
|
find_package(Subversion)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# subversion found
|
|
|
|
if(Subversion_FOUND)
|
|
|
|
set(SVN TRUE)
|
|
|
|
else(Subversion_FOUND)
|
|
|
|
set(SVN FALSE)
|
|
|
|
endif(Subversion_FOUND)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Plugins
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# Check all plugins for additional dependencies.
|
|
|
|
# If all dependencies of a plugin are available, including OS, the plugin will
|
|
|
|
# be build.
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# null plugins should work on every platform, enable them all
|
|
|
|
#---------------------------------------
|
|
|
|
# CDVDnull
|
|
|
|
#---------------------------------------
|
|
|
|
set(CDVDnull TRUE)
|
|
|
|
#---------------------------------------
|
|
|
|
|
2010-05-05 20:06:05 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# CDVDiso
|
|
|
|
#---------------------------------------
|
2010-05-06 09:33:23 +00:00
|
|
|
# requires: -BZip2
|
2010-05-05 20:06:05 +00:00
|
|
|
#---------------------------------------
|
2010-05-06 09:33:23 +00:00
|
|
|
if(BZIP2_FOUND)
|
|
|
|
set(CDVDiso TRUE)
|
|
|
|
else(BZIP2_FOUND)
|
|
|
|
set(CDVDiso FALSE)
|
|
|
|
endif(BZIP2_FOUND)
|
2010-05-05 20:06:05 +00:00
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# dev9null
|
|
|
|
#---------------------------------------
|
|
|
|
set(dev9null TRUE)
|
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# FWnull
|
|
|
|
#---------------------------------------
|
|
|
|
set(FWnull TRUE)
|
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# GSnull
|
|
|
|
#---------------------------------------
|
|
|
|
set(GSnull TRUE)
|
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# PadNull
|
|
|
|
#---------------------------------------
|
|
|
|
set(PadNull TRUE)
|
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# SPU2null
|
|
|
|
#---------------------------------------
|
|
|
|
set(SPU2null TRUE)
|
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# USBnull
|
|
|
|
#---------------------------------------
|
|
|
|
set(USBnull TRUE)
|
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# onepad
|
|
|
|
#---------------------------------------
|
2010-01-22 04:36:49 +00:00
|
|
|
# requires: -SDL
|
2010-01-21 15:12:50 +00:00
|
|
|
#---------------------------------------
|
|
|
|
if(SDL_FOUND)
|
|
|
|
set(onepad TRUE)
|
|
|
|
else(SDL_FOUND)
|
|
|
|
set(onepad FALSE)
|
|
|
|
endif(SDL_FOUND)
|
|
|
|
#---------------------------------------
|
|
|
|
|
2010-05-05 20:06:05 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# zeropad
|
|
|
|
#---------------------------------------
|
|
|
|
# requires: -SDL
|
|
|
|
#---------------------------------------
|
|
|
|
if(SDL_FOUND)
|
|
|
|
set(zeropad TRUE)
|
|
|
|
else(SDL_FOUND)
|
|
|
|
set(zeropad FALSE)
|
|
|
|
endif(SDL_FOUND)
|
|
|
|
#---------------------------------------
|
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# spu2-x
|
|
|
|
#---------------------------------------
|
2010-01-22 04:36:49 +00:00
|
|
|
# requires: -SoundTouch
|
2010-01-21 15:12:50 +00:00
|
|
|
#---------------------------------------
|
|
|
|
if(SOUNDTOUCH_FOUND)
|
|
|
|
set(spu2-x TRUE)
|
|
|
|
else(SOUNDTOUCH_FOUND)
|
|
|
|
set(spu2-x FALSE)
|
|
|
|
endif(SOUNDTOUCH_FOUND)
|
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#---------------------------------------
|
|
|
|
# zerogs
|
|
|
|
#---------------------------------------
|
2010-05-12 10:25:43 +00:00
|
|
|
# requires: -GLEW
|
2010-01-22 04:36:49 +00:00
|
|
|
# -OpenGL
|
|
|
|
# -X11
|
2010-05-12 10:25:43 +00:00
|
|
|
# -CG
|
2010-01-21 15:12:50 +00:00
|
|
|
#---------------------------------------
|
2010-05-12 10:25:43 +00:00
|
|
|
if(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
|
2010-01-21 15:12:50 +00:00
|
|
|
set(zerogs TRUE)
|
2010-05-12 10:25:43 +00:00
|
|
|
else(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
|
2010-01-21 15:12:50 +00:00
|
|
|
set(zerogs FALSE)
|
2010-05-12 10:25:43 +00:00
|
|
|
endif(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
|
2010-01-21 15:12:50 +00:00
|
|
|
#---------------------------------------
|
|
|
|
|
2010-05-12 10:25:43 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# zzogl-pg
|
|
|
|
#---------------------------------------
|
|
|
|
# requires: -GLEW
|
|
|
|
# -OpenGL
|
|
|
|
# -X11
|
|
|
|
# -CG
|
|
|
|
#---------------------------------------
|
|
|
|
if(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
|
|
|
|
set(zzogl TRUE)
|
|
|
|
else(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
|
|
|
|
set(zzogl FALSE)
|
|
|
|
endif(GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND CG_FOUND)
|
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
#---------------------------------------
|
|
|
|
# zerospu2
|
|
|
|
#---------------------------------------
|
2010-01-22 04:36:49 +00:00
|
|
|
# requires: -SoundTouch
|
|
|
|
# -ALSA
|
|
|
|
# -PortAudio
|
2010-01-21 15:12:50 +00:00
|
|
|
#---------------------------------------
|
|
|
|
if(SOUNDTOUCH_FOUND AND ALSA_FOUND)
|
|
|
|
set(zerospu2 TRUE)
|
|
|
|
else(SOUNDTOUCH_FOUND AND ALSA_FOUND)
|
|
|
|
set(zerospu2 FALSE)
|
|
|
|
endif(SOUNDTOUCH_FOUND AND ALSA_FOUND)
|
|
|
|
#---------------------------------------
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
# [TODO] Write CMakeLists.txt for these plugins.
|
|
|
|
set(cdvdGigaherz FALSE)
|
2010-05-05 20:06:05 +00:00
|
|
|
#set(CDVDiso FALSE)
|
2010-01-21 15:12:50 +00:00
|
|
|
set(CDVDisoEFP FALSE)
|
|
|
|
set(CDVDlinuz FALSE)
|
|
|
|
set(CDVDolio FALSE)
|
|
|
|
set(CDVDpeops FALSE)
|
|
|
|
set(GSdx FALSE)
|
|
|
|
set(LilyPad FALSE)
|
|
|
|
set(PeopsSPU2 FALSE)
|
|
|
|
set(SSSPSXPAD FALSE)
|
|
|
|
set(xpad FALSE)
|
2010-05-05 20:06:05 +00:00
|
|
|
#set(zeropad FALSE)
|
2010-01-21 15:12:50 +00:00
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|