* Apply a co-patch of Air and me to use linux friendly include path

[cmake]:
* Update to use the above patch.
* Remove a52. Need to use system version.
* Remove stub file. Append pcsx2 to 3rparty library to ease futur support.

Important Note: codeblock will probably need some update. (add 3rdparty/soundtouch_linux_include in include path)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3200 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2010-06-11 13:51:43 +00:00
parent 68eeefd130
commit 6e118887a5
26 changed files with 58 additions and 93 deletions

View File

@ -1,21 +1,14 @@
# make bzip2
# build project bzip2
if(projectBZip2)
add_subdirectory(bzip2)
endif(projectBZip2)
# make zlib
# build project zlib
if(projectZLIB)
add_subdirectory(zlib)
endif(projectZLIB)
# make SoundTouch
# build project SoundTouch
if(projectSoundTouch)
add_subdirectory(SoundTouch)
endif(projectSoundTouch)
# make liba52
add_subdirectory(liba52)

View File

@ -1,7 +1,7 @@
# SoundTouch library
# library name
set(SoundTouchName SoundTouch)
set(SoundTouchName pcsx2_SoundTouch)
set(CommonFlags
-m32

View File

@ -1,7 +1,7 @@
# bzip2 library
# library name
set(bzip2Name bzip2)
set(bzip2Name pcsx2_bzip2)
set(CommonFlags
-m32

View File

@ -1,7 +1,7 @@
# a52 library
# library name
set(a52Name a52)
set(a52Name pcsx2_a52)
set(CommonFlags
-Wall

View File

@ -0,0 +1 @@
../SoundTouch

View File

@ -1,7 +1,7 @@
# zlib library
# library name
set(zlibName zlib)
set(zlibName pcsx2_zlib)
set(CommonFlags
-W

View File

@ -3,7 +3,6 @@
# Enable/disable the stipping : -DCMAKE_BUILD_STRIP=TRUE|FALSE
### Force the choice of 3rd party library in pcsx2 over system libraries
# Use all internal lib: -DFORCE_INTERNAL_ALL=TRUE
# Use a52 internal lib: -DFORCE_INTERNAL_A52=TRUE
# Use bzip internal lib: -DFORCE_INTERNAL_BZIP2=TRUE
# Use soundtouch internal lib: -DFORCE_INTERNAL_SOUNDTOUCH=TRUE
# Use zlib internal lib: -DFORCE_INTERNAL_ZLIB=TRUE
@ -38,16 +37,11 @@ endif(NOT DEFINED CMAKE_BUILD_STRIP)
# Select library system vs 3rdparty
#-------------------------------------------------------------------------------
if(FORCE_INTERNAL_ALL)
set(FORCE_INTERNAL_A52 TRUE)
set(FORCE_INTERNAL_BZIP2 TRUE)
set(FORCE_INTERNAL_SOUNDTOUCH TRUE)
set(FORCE_INTERNAL_ZLIB TRUE)
endif(FORCE_INTERNAL_ALL)
if(NOT DEFINED FORCE_INTERNAL_A52)
set(FORCE_INTERNAL_A52 FALSE)
endif(NOT DEFINED FORCE_INTERNAL_A52)
if(NOT DEFINED FORCE_INTERNAL_BZIP2)
set(FORCE_INTERNAL_BZIP2 FALSE)
endif(NOT DEFINED FORCE_INTERNAL_BZIP2)

View File

@ -10,10 +10,11 @@ if(SOUNDTOUCH_INCLUDE_DIR AND SOUNDTOUCH_LIBRARIES)
endif(SOUNDTOUCH_INCLUDE_DIR AND SOUNDTOUCH_LIBRARIES)
# include dir
find_path(SOUNDTOUCH_INCLUDE_DIR SoundTouch.h
/usr/include/soundtouch
/usr/local/include/soundtouch
)
#find_path(SOUNDTOUCH_INCLUDE_DIR SoundTouch.h
# /usr/include/soundtouch
# /usr/local/include/soundtouch
# )
find_path(SOUNDTOUCH_INCLUDE_DIR soundtouch/SoundTouch.h)
# finally the library itself
find_library(libSoundTouch NAMES SoundTouch)

View File

@ -35,7 +35,6 @@ include(FindSoundTouch)
# Current implementation:
# 1/ include 3rdparty sub-directory that we will used (either request or fallback)
# 2/ include system one
# 3/ include 3rdpary main (just in case we miss some include files)
#----------------------------------------
# Fallback on 3rdparty libraries
#----------------------------------------
@ -64,20 +63,10 @@ if(NOT SOUNDTOUCH_FOUND OR FORCE_INTERNAL_SOUNDTOUCH)
set(SOUNDTOUCH_FOUND TRUE)
# Set path
set(SOUNDTOUCH_LIBRARIES SoundTouch)
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/SoundTouch)
# include_directories(${PROJECT_SOURCE_DIR}/3rdparty/SoundTouch)
include_directories(${PROJECT_SOURCE_DIR}/3rdparty/soundtouch_linux_include)
endif(NOT SOUNDTOUCH_FOUND OR FORCE_INTERNAL_SOUNDTOUCH)
if(NOT A52_FOUND OR FORCE_INTERNAL_A52)
# use project one
set(projectA52 TRUE)
set(A52_FOUND TRUE)
# Set path
set(A52_LIBRARIES A52)
# XXX Need to be updated when repository will be updated
# For the moment include are done with the last fallback in bottom of the file
# include_directories(${PROJECT_SOURCE_DIR}/3rdparty/a52_internal)
endif(NOT A52_FOUND OR FORCE_INTERNAL_A52)
#----------------------------------------
# Use system include (if not 3rdparty one)
#----------------------------------------
@ -94,9 +83,9 @@ if(Linux)
endif(Linux)
# A52
if(A52_FOUND AND NOT projectA52)
if(A52_FOUND)
include_directories(${A52_INCLUDE_DIR})
endif(A52_FOUND AND NOT projectA52)
endif(A52_FOUND)
# ALSA
if(ALSA_FOUND)
@ -164,9 +153,3 @@ endif(wxWidgets_FOUND)
if(ZLIB_FOUND AND NOT projectZLIB)
include_directories(${ZLIB_INCLUDE_DIRS})
endif(ZLIB_FOUND AND NOT projectZLIB)
#----------------------------------------
# In all others situation fallback to the 3rdparty
#----------------------------------------
# XXX Must be delete when all include will be fixed
include_directories(${PROJECT_SOURCE_DIR}/3rdparty)

View File

@ -76,7 +76,7 @@ typedef int BOOL;
// unchanged for long periods of time, or happen to be used by almost everything, so they
// need a full recompile anyway, when modified (etc)
#include <zlib/zlib.h>
#include "zlib.h"
#include "Pcsx2Defs.h"
#include "i18n.h"

View File

@ -1,2 +0,0 @@
# CDVDiso plugin
add_subdirectory(src)

View File

@ -23,8 +23,8 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <zlib/zlib.h>
#include <bzip2/bzlib.h>
#include "zlib.h"
#include "bzlib.h"
#include "CDVDiso.h"
#include "libiso.h"

View File

@ -1,2 +0,0 @@
# CDVDLinuz plugin
add_subdirectory(Src)

View File

@ -7,17 +7,17 @@
# make CDVDiso
if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDiso" AND CDVDiso)
add_subdirectory(CDVDiso)
add_subdirectory(CDVDiso/src)
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDiso" AND CDVDiso)
# make CDVDisoEFP
if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDisoEFP" AND CDVDisoEFP)
add_subdirectory(CDVDisoEFP)
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDisoEFP" AND CDVDisoEFP)
# if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDisoEFP" AND CDVDisoEFP)
# add_subdirectory(CDVDisoEFP)
# endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDisoEFP" AND CDVDisoEFP)
# make CDVDlinuz
if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDlinuz" AND CDVDlinuz)
add_subdirectory(CDVDlinuz)
add_subdirectory(CDVDlinuz/Src)
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDlinuz" AND CDVDlinuz)
# make CDVDnull
@ -26,9 +26,9 @@ if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDnull" AND CDVDnull)
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDnull" AND CDVDnull)
# make CDVDolio
if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDolio" AND CDVDolio)
add_subdirectory(CDVDolio)
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDolio" AND CDVDolio)
# if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDolio" AND CDVDolio)
# add_subdirectory(CDVDolio)
# endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDolio" AND CDVDolio)
# make CDVDpeops
#if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/CDVDpeops" AND CDVDpeops)
@ -71,9 +71,9 @@ if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/PadNull" AND PadNull)
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/PadNull" AND PadNull)
# make PeopsSPU2
if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/PeopsSPU2" AND PeopsSPU2)
add_subdirectory(PeopsSPU2)
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/PeopsSPU2" AND PeopsSPU2)
# if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/PeopsSPU2" AND PeopsSPU2)
# add_subdirectory(PeopsSPU2)
# endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/PeopsSPU2" AND PeopsSPU2)
# make SPU2null
if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/SPU2null" AND SPU2null)
@ -82,7 +82,7 @@ endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/SPU2null" AND SPU2null)
# make spu2-x
if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/spu2-x" AND spu2-x)
add_subdirectory(spu2-x)
add_subdirectory(spu2-x/src)
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/spu2-x" AND spu2-x)
# make SSSPSXPAD
@ -107,7 +107,7 @@ endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/USBnull" AND USBnull)
# make zzogl-pg
if(EXISTS "${PROJECT_SOURCE_DIR}/plugins/zzogl-pg" AND zzogl)
add_subdirectory(zzogl-pg)
add_subdirectory(zzogl-pg/opengl)
endif(EXISTS "${PROJECT_SOURCE_DIR}/plugins/zzogl-pg" AND zzogl)
# make zeropad

View File

@ -1,2 +0,0 @@
# make spu-x
add_subdirectory(src)

View File

@ -16,17 +16,25 @@
//Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Commenting this will disable all the code in Decoder.cpp (which is the only code that uses liba52 in spu2-x.)
#define ENABLE_DECODER
#include "Global.h"
#ifdef ENABLE_DECODER
// Commenting this will disable all the code in Decoder.cpp (which is the only code that uses liba52 in spu2-x.)
#ifndef ENABLE_DECODER
# define ENABLE_DECODER 1
#endif
#if ENABLE_DECODER
extern "C" {
#include "liba52/inttypes.h"
#include "liba52/a52.h"
#include "liba52/mm_accel.h"
#ifdef _MSC_VER
# include "liba52/inttypes.h"
# include "liba52/a52.h"
# include "liba52/mm_accel.h"
#else
# include <inttypes.h>
# include "a52dec/a52.h"
# include "a52dec/mm_accel.h"
#endif
}
extern u32 spdif_read_data(u8 *buff, u32 max_data);

View File

@ -22,7 +22,7 @@
#include "Global.h"
#include "Dialogs.h"
#include "Config.h"
#include "SoundTouch/SoundTouch.h"
#include "soundtouch/SoundTouch.h"
namespace SoundtouchCfg
{

View File

@ -20,10 +20,10 @@
#define _WIN32_DCOM
#include "Dialogs.h"
#include "portaudio/include/portaudio.h"
#include "portaudio.h"
#ifdef __WIN32__
#include "portaudio/include/pa_win_wasapi.h"
#include "pa_win_wasapi.h"
#endif
#ifdef __LINUX__

View File

@ -16,8 +16,7 @@
*/
#include "Global.h"
#include "SoundTouch/SoundTouch.h"
#include "SoundTouch/WavFile.h"
#include "soundtouch/SoundTouch.h"
static soundtouch::SoundTouch* pSoundTouch = NULL;

View File

@ -16,7 +16,7 @@
*/
#include "Global.h"
#include "SoundTouch/WavFile.h"
#include "soundtouch/WavFile.h"
static WavOutFile* _new_WavOutFile( const char* destfile )
{

View File

@ -21,8 +21,7 @@
#include "zerospu2.h"
#include "SoundTouch/SoundTouch.h"
#include "SoundTouch/WavFile.h"
#include "soundtouch/SoundTouch.h"
// VOICE_PROCESSED definitions

View File

@ -22,8 +22,7 @@
#include <assert.h>
#include <stdlib.h>
#include "SoundTouch/SoundTouch.h"
#include "SoundTouch/WavFile.h"
#include "soundtouch/SoundTouch.h"
void CALLBACK SPU2readDMAMem(u16 *pMem, int size, int channel)
{

View File

@ -27,8 +27,8 @@
#include <assert.h>
#include <stdlib.h>
#include "SoundTouch/SoundTouch.h"
#include "SoundTouch/WavFile.h"
#include "soundtouch/SoundTouch.h"
#include "soundtouch/WavFile.h"
char libraryName[256];

View File

@ -18,8 +18,8 @@
#include "zerospu2.h"
#include "zeroworker.h"
#include "SoundTouch/SoundTouch.h"
#include "SoundTouch/WavFile.h"
#include "soundtouch/SoundTouch.h"
#include "soundtouch/WavFile.h"
s32 g_logsound = 0;
WavOutFile* g_pWavRecord=NULL; // used for recording

View File

@ -1,6 +0,0 @@
# zzogl plugin
# zerogs plugin opengl
if(UNIX)
add_subdirectory(opengl)
endif(UNIX)

View File

@ -8,7 +8,7 @@
#include <assert.h>
//#define ZLIB_WINAPI
#include "zlib/zlib.h"
#include "zlib.h"
int def(char *src, char *dst, int bytes_to_compress, int *bytes_after_compressed) ;
int inf(char *src, char *dst, int bytes_to_decompress, int maximum_after_decompress) ;