1 |
# SoundTouch library |
2 |
|
3 |
# library name |
4 |
set(Output pcsx2_SoundTouch) |
5 |
|
6 |
set(CommonFlags |
7 |
-march=athlon-xp |
8 |
-march=prescott |
9 |
) |
10 |
|
11 |
set(OptimizationFlags |
12 |
-Os |
13 |
-W |
14 |
) |
15 |
|
16 |
# Debug - Build |
17 |
if(CMAKE_BUILD_TYPE STREQUAL Debug) |
18 |
# add defines |
19 |
add_definitions(${CommonFlags} -g) |
20 |
endif(CMAKE_BUILD_TYPE STREQUAL Debug) |
21 |
|
22 |
# Devel - Build |
23 |
if(CMAKE_BUILD_TYPE STREQUAL Devel) |
24 |
# add defines |
25 |
add_definitions(${CommonFlags} ${OptimizationFlags}) |
26 |
endif(CMAKE_BUILD_TYPE STREQUAL Devel) |
27 |
|
28 |
# Release - Build |
29 |
if(CMAKE_BUILD_TYPE STREQUAL Release) |
30 |
# add defines |
31 |
add_definitions(${CommonFlags} ${OptimizationFlags}) |
32 |
endif(CMAKE_BUILD_TYPE STREQUAL Release) |
33 |
|
34 |
# variable with all sources of this library |
35 |
set(SoundTouchSources |
36 |
AAFilter.cpp |
37 |
FIFOSampleBuffer.cpp |
38 |
FIRFilter.cpp |
39 |
RateTransposer.cpp |
40 |
SoundTouch.cpp |
41 |
TDStretch.cpp |
42 |
WavFile.cpp |
43 |
cpu_detect_x86_gcc.cpp |
44 |
mmx_optimized.cpp |
45 |
sse_optimized.cpp) |
46 |
|
47 |
# variable with all headers of this library |
48 |
set(SoundTouchHeaders |
49 |
AAFilter.h |
50 |
BPMDetect.h |
51 |
FIFOSampleBuffer.h |
52 |
FIFOSamplePipe.h |
53 |
FIRFilter.h |
54 |
RateTransposer.h |
55 |
STTypes.h |
56 |
SoundTouch.h |
57 |
TDStretch.h |
58 |
WavFile.h |
59 |
cpu_detect.h) |
60 |
|
61 |
# add library |
62 |
add_library(${Output} STATIC ${SoundTouchSources} ${SoundTouchHeaders}) |
63 |
|
64 |
# User flags options |
65 |
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "") |
66 |
target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}") |
67 |
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "") |