aboutsummaryrefslogtreecommitdiff
path: root/ports/libmad/CMakeLists.txt
blob: 522c0fbea8e26d25b8316795afae55e51b6b307d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 2.8)

project(libmad)

 IF(MSVC)
    set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
 ENDIF(MSVC)
 
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}
)
 
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
    DESTINATION include
)