mirror of https://github.com/PCSX2/pcsx2.git
67 lines
1.3 KiB
CMake
67 lines
1.3 KiB
CMake
# SoundTouch library
|
|
|
|
# library name
|
|
set(SoundTouchName pcsx2_SoundTouch)
|
|
|
|
set(CommonFlags
|
|
-m32
|
|
-march=athlon-xp
|
|
-march=prescott
|
|
)
|
|
|
|
set(OptimizationFlags
|
|
-Os
|
|
-W
|
|
)
|
|
|
|
# Debug - Build
|
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
# add defines
|
|
add_definitions(${CommonFlags} -g)
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
# Devel - Build
|
|
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
# add defines
|
|
add_definitions(${CommonFlags} ${OptimizationFlags})
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
# Release - Build
|
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
# add defines
|
|
add_definitions(${CommonFlags} ${OptimizationFlags})
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
# 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
|
|
STTypes.h
|
|
SoundTouch.h
|
|
TDStretch.h
|
|
WavFile.h
|
|
cpu_detect.h)
|
|
|
|
# add library
|
|
add_library(${SoundTouchName} STATIC ${SoundTouchSources} ${SoundTouchHeaders})
|
|
|
|
# Force the linker into 32 bits mode
|
|
target_link_libraries(${SoundTouchName} -m32)
|