2017-04-24 07:36:25 +08:00
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
|
|
|
project(libmad)
|
|
|
|
|
|
|
|
set(SOURCES
|
|
|
|
bit.c
|
|
|
|
bit.h
|
|
|
|
config.h
|
|
|
|
decoder.c
|
|
|
|
decoder.h
|
|
|
|
fixed.c
|
|
|
|
fixed.h
|
|
|
|
frame.c
|
|
|
|
frame.h
|
|
|
|
global.h
|
|
|
|
huffman.c
|
|
|
|
huffman.h
|
|
|
|
layer12.c
|
|
|
|
layer12.h
|
|
|
|
layer3.c
|
|
|
|
layer3.h
|
|
|
|
mad.h
|
|
|
|
stream.c
|
|
|
|
stream.h
|
|
|
|
synth.c
|
|
|
|
synth.h
|
|
|
|
timer.c
|
|
|
|
timer.h
|
|
|
|
version.c
|
|
|
|
version.h
|
|
|
|
)
|
|
|
|
|
|
|
|
add_library(
|
|
|
|
mad
|
|
|
|
${SOURCES}
|
|
|
|
)
|
2019-05-03 13:57:43 +08:00
|
|
|
|
2017-04-24 07:36:25 +08:00
|
|
|
target_compile_definitions(mad
|
|
|
|
PRIVATE _LIB _MBCS ASO_ZEROCHECK HAVE_CONFIG_H FPM_DEFAULT
|
|
|
|
PRIVATE _CRT_SECURE_NO_WARNINGS
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS mad
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
FILES mad.h
|
2017-08-12 11:33:01 +08:00
|
|
|
DESTINATION include
|
2017-04-24 07:36:25 +08:00
|
|
|
)
|