2010-05-15 23:36:13 +00:00
|
|
|
# a52 library
|
|
|
|
|
|
|
|
# library name
|
2010-07-25 13:54:26 +00:00
|
|
|
set(Output pcsx2_a52)
|
2010-05-15 23:36:13 +00:00
|
|
|
|
2010-06-04 11:07:25 +00:00
|
|
|
set(CommonFlags
|
|
|
|
-Wall
|
|
|
|
-g
|
|
|
|
)
|
|
|
|
|
|
|
|
set(OptimizationFlags
|
|
|
|
-Os
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2010-05-15 23:36:13 +00:00
|
|
|
# Debug - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
# add defines
|
2010-06-04 11:07:25 +00:00
|
|
|
add_definitions(${CommonFlags})
|
2010-05-15 23:36:13 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
|
|
|
|
|
|
|
|
# Devel - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
# add defines
|
2010-06-04 11:07:25 +00:00
|
|
|
add_definitions(${CommonFlags} ${OptimizationFlags})
|
2010-05-15 23:36:13 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
|
|
|
|
|
|
|
|
# Release - Build
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
# add defines
|
2010-06-04 11:07:25 +00:00
|
|
|
add_definitions(${CommonFlags} ${OptimizationFlags})
|
2010-05-15 23:36:13 +00:00
|
|
|
endif(CMAKE_BUILD_TYPE STREQUAL Release)
|
|
|
|
|
|
|
|
# variable with all sources of this library
|
|
|
|
set(a52Sources
|
|
|
|
bit_allocate.c
|
|
|
|
bitstream.c
|
|
|
|
downmix.c
|
|
|
|
imdct.c
|
|
|
|
parse.c)
|
|
|
|
|
|
|
|
# variable with all headers of this library
|
|
|
|
set(a52Headers
|
|
|
|
a52.h
|
|
|
|
a52_internal.h
|
|
|
|
attributes.h
|
|
|
|
bitstream.h
|
|
|
|
config.h
|
|
|
|
inttypes.h
|
|
|
|
mm_accel.h
|
|
|
|
tables.h
|
|
|
|
tendra.h)
|
|
|
|
|
|
|
|
# add library
|
2010-07-25 13:54:26 +00:00
|
|
|
add_library(${Output} STATIC ${a52Sources} ${a52Headers})
|
2010-07-25 14:20:03 +00:00
|
|
|
|
|
|
|
# User flags options
|
|
|
|
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
|
|
|
|
target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
|
|
|
|
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
|