1 |
# a52 library |
2 |
|
3 |
# library name |
4 |
set(a52Name a52) |
5 |
|
6 |
# Debug - Build |
7 |
if(CMAKE_BUILD_TYPE STREQUAL Debug) |
8 |
# add defines |
9 |
add_definitions(-g -Wall) |
10 |
endif(CMAKE_BUILD_TYPE STREQUAL Debug) |
11 |
|
12 |
# Devel - Build |
13 |
if(CMAKE_BUILD_TYPE STREQUAL Devel) |
14 |
# add defines |
15 |
add_definitions(-O2 -Wall -g -Os) |
16 |
endif(CMAKE_BUILD_TYPE STREQUAL Devel) |
17 |
|
18 |
# Release - Build |
19 |
if(CMAKE_BUILD_TYPE STREQUAL Release) |
20 |
# add defines |
21 |
add_definitions(-O2 -Wall -g -Os) |
22 |
endif(CMAKE_BUILD_TYPE STREQUAL Release) |
23 |
|
24 |
# variable with all sources of this library |
25 |
set(a52Sources |
26 |
bit_allocate.c |
27 |
bitstream.c |
28 |
downmix.c |
29 |
imdct.c |
30 |
parse.c) |
31 |
|
32 |
# variable with all headers of this library |
33 |
set(a52Headers |
34 |
a52.h |
35 |
a52_internal.h |
36 |
attributes.h |
37 |
bitstream.h |
38 |
config.h |
39 |
inttypes.h |
40 |
mm_accel.h |
41 |
tables.h |
42 |
tendra.h) |
43 |
|
44 |
# add library |
45 |
add_library(${a52Name} STATIC ${a52Sources} ${a52Headers}) |
46 |
|
47 |
# Force the linker into 32 bits mode |
48 |
target_link_libraries(${a52Name} -m32) |