* Do not build spu2x unless all dependencies are ok

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3147 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
gregory.hainaut 2010-06-03 15:43:10 +00:00
parent 6055ca126b
commit 0d6ba65557
2 changed files with 14 additions and 10 deletions

View File

@ -29,7 +29,7 @@ if(Linux) # Linux only
# add gtk include directories
include_directories(${GTK2_INCLUDE_DIRS})
#else(GTK2_FOUND)
# message(FATAL_ERROR "GTK2 libraries and include files not found.
# message(FATAL_ERROR "GTK2 libraries and include files not found.
# Please install GTK2 version ${minimal_GTK2_version} or higher.")
endif(GTK2_FOUND)
@ -67,6 +67,7 @@ else(ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB)
# use project one
set(projectZLIB TRUE)
set(ZLIB_LIBRARIES zlib)
set(ZLIB_FOUND TRUE)
endif(ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB)
#------------------------------------------------------------
@ -84,7 +85,7 @@ if(Linux) # Linux only
# add x11 include directories
include_directories(${X11_INCLUDE_DIR})
#else(X11_FOUND)
# message(FATAL_ERROR "X11 libraries and include files not found.
# message(FATAL_ERROR "X11 libraries and include files not found.
# Please install X11.")
endif(X11_FOUND)
endif(Linux)
@ -107,6 +108,7 @@ else(A52_FOUND AND NOT FORCE_INTERNAL_A52)
# use project one
set(projectA52 TRUE)
set(A52_LIBRARIES A52)
set(A52_FOUND TRUE)
endif(A52_FOUND AND NOT FORCE_INTERNAL_A52)
@ -133,6 +135,7 @@ else(BZIP2_FOUND AND NOT FORCE_INTERNAL_BZIP2)
# use project one
set(projectBZip2 TRUE)
set(BZIP2_LIBRARIES bzip2)
set(BZIP2_FOUND TRUE)
endif(BZIP2_FOUND AND NOT FORCE_INTERNAL_BZIP2)
#------------------------------------------------------------
@ -196,7 +199,7 @@ endif(SDL_FOUND)
# SoundTouch optional
#include(FindSoundTouch)
# found SoundTouch
# found SoundTouch
if(SOUNDTOUCH_FOUND AND NOT FORCE_INTERNAL_SOUNDTOUCH)
# add SoundTouch include directories
include_directories(${SOUNDTOUCH_INCLUDE_DIR})
@ -310,12 +313,15 @@ endif(SDL_FOUND)
# spu2-x
#---------------------------------------
# requires: -SoundTouch
# -ALSA
# -Portaudio
# -A52
#---------------------------------------
if(SOUNDTOUCH_FOUND)
if(A52_FOUND AND ALSA_FOUND AND PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND)
set(spu2-x TRUE)
else(SOUNDTOUCH_FOUND)
else(A52_FOUND AND ALSA_FOUND AND PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND)
set(spu2-x FALSE)
endif(SOUNDTOUCH_FOUND)
endif(A52_FOUND AND ALSA_FOUND AND PORTAUDIO_FOUND AND SOUNDTOUCH_FOUND)
#---------------------------------------
#---------------------------------------

View File

@ -122,10 +122,8 @@ target_link_libraries(${spu2xName} Utilities x86emitter Utilities)
# link target with ALSA
target_link_libraries(${spu2xName} ${ALSA_LIBRARIES})
# # link target with PortAudio
if(PORTAUDIO_FOUND)
target_link_libraries(${spu2xName} ${PORTAUDIO_LIBRARIES})
endif(PORTAUDIO_FOUND)
# link target with PortAudio
target_link_libraries(${spu2xName} ${PORTAUDIO_LIBRARIES})
# link target with SoundTouch
target_link_libraries(${spu2xName} ${SOUNDTOUCH_LIBRARIES})