2010-01-21 15:12:50 +00:00
|
|
|
# SoundTouch library
|
|
|
|
|
|
|
|
# library name
|
2010-06-11 13:51:43 +00:00
|
|
|
set(SoundTouchName pcsx2_SoundTouch)
|
2010-01-21 15:12:50 +00:00
|
|
|
|
2010-06-04 11:07:25 +00:00
|
|
|
set(CommonFlags
|
|
|
|
-m32
|
|
|
|
-march=athlon-xp
|
|
|
|
-march=prescott
|
|
|
|
)
|
|
|
|
|
2010-06-04 17:31:55 +00:00
|
|
|
set(OptimizationFlags
|
|
|
|
-Os
|
|
|
|
-W
|
|
|
|
)
|
|
|
|
|
2010-01-22 04:36:49 +00:00
|
|
|
# Debug - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
# add defines
|
2010-06-04 17:31:55 +00:00
|
|
|
add_definitions(${CommonFlags} -g)
|
2010-01-22 04:36:49 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
|
|
|
|
# Devel - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
# add defines
|
2010-06-04 17:31:55 +00:00
|
|
|
add_definitions(${CommonFlags} ${OptimizationFlags})
|
2010-01-22 04:36:49 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
|
|
|
|
# Release - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
# add defines
|
2010-06-04 17:31:55 +00:00
|
|
|
add_definitions(${CommonFlags} ${OptimizationFlags})
|
2010-01-22 04:36:49 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
|
2010-01-21 15:12:50 +00:00
|
|
|
# variable with all sources of this library
|
|
|
|
set(SoundTouchSources
|
|
|
|
AAFilter.cpp
|
|
|
|
FIFOSampleBuffer.cpp
|
|
|
|
FIRFilter.cpp
|
|
|
|
RateTransposer.cpp
|
|
|
|
SoundTouch.cpp
|
|
|
|
TDStretch.cpp
|
|
|
|
WavFile.cpp
|
|
|
|
cpu_detect_x86_gcc.cpp
|
|
|
|
mmx_optimized.cpp
|
|
|
|
sse_optimized.cpp)
|
|
|
|
|
|
|
|
# variable with all headers of this library
|
|
|
|
set(SoundTouchHeaders
|
|
|
|
AAFilter.h
|
|
|
|
BPMDetect.h
|
|
|
|
FIFOSampleBuffer.h
|
|
|
|
FIFOSamplePipe.h
|
|
|
|
FIRFilter.h
|
|
|
|
RateTransposer.h
|
2010-01-22 04:36:49 +00:00
|
|
|
STTypes.h
|
2010-01-21 15:12:50 +00:00
|
|
|
SoundTouch.h
|
|
|
|
TDStretch.h
|
|
|
|
WavFile.h
|
|
|
|
cpu_detect.h)
|
|
|
|
|
|
|
|
# add library
|
2010-01-22 04:36:49 +00:00
|
|
|
add_library(${SoundTouchName} STATIC ${SoundTouchSources} ${SoundTouchHeaders})
|
2010-01-21 15:12:50 +00:00
|
|
|
|
2010-05-16 00:36:42 +00:00
|
|
|
# Force the linker into 32 bits mode
|
|
|
|
target_link_libraries(${SoundTouchName} -m32)
|