OSDN Git Service

Enable stack protection
[timidity41/timidity41.git] / FLAC / CMakeLists.txt
1
2 add_definitions(
3     -DFLAC_API_EXPORTS
4     -DFLAC__HAS_X86INTRIN
5     -DFLAC__HAS_OGG
6
7     -DPACKAGE_VERSION="1.4.1"
8 )
9
10 if(MINGW)
11     add_definitions(
12         -DHAVE_FSEEKO
13         -DHAVE_LROUND
14     )
15 endif()
16
17 include_directories(src)
18
19 add_library(
20     FLAC SHARED
21
22     include/FLAC/all.h
23     include/FLAC/assert.h
24     include/FLAC/callback.h
25     include/FLAC/export.h
26     include/FLAC/format.h
27     include/FLAC/metadata.h
28     include/FLAC/ordinals.h
29     include/FLAC/stream_decoder.h
30     include/FLAC/stream_encoder.h
31
32     src/private/all.h
33     src/private/bitmath.h
34     src/private/bitreader.h
35     src/private/bitwriter.h
36     src/private/cpu.h
37     src/private/crc.h
38     src/private/fixed.h
39     src/private/float.h
40     src/private/format.h
41     src/private/lpc.h
42     src/private/macros.h
43     src/private/md5.h
44     src/private/memory.h
45     src/private/metadata.h
46     src/private/ogg_decoder_aspect.h
47     src/private/ogg_encoder_aspect.h
48     src/private/ogg_helper.h
49     src/private/ogg_mapping.h
50     src/private/stream_encoder.h
51     src/private/stream_encoder_framing.h
52     src/private/window.h
53
54     src/share/alloc.h
55     src/share/compat.h
56     src/share/endswap.h
57     src/share/getopt.h
58     src/share/grabbag.h
59     src/share/macros.h
60     src/share/private.h
61     src/share/replaygain_analysis.h
62     src/share/replaygain_synthesis.h
63     src/share/safe_str.h
64     src/share/utf8.h
65     src/share/win_utf8_io.h
66
67     src/bitmath.c
68     src/bitreader.c
69     src/bitwriter.c
70     src/cpu.c
71     src/crc.c
72     src/fixed.c
73     src/fixed_intrin_sse2.c
74     src/fixed_intrin_ssse3.c
75     src/float.c
76     src/format.c
77     src/lpc.c
78     src/lpc_intrin_avx2.c
79     src/lpc_intrin_fma.c
80     src/lpc_intrin_sse2.c
81     src/lpc_intrin_sse41.c
82     src/md5.c
83     src/memory.c
84     src/metadata_iterators.c
85     src/metadata_object.c
86     src/ogg_decoder_aspect.c
87     src/ogg_encoder_aspect.c
88     src/ogg_helper.c
89     src/ogg_mapping.c
90     src/stream_decoder.c
91     src/stream_encoder.c
92     src/stream_encoder_framing.c
93     src/stream_encoder_intrin_avx2.c
94     src/stream_encoder_intrin_sse2.c
95     src/stream_encoder_intrin_ssse3.c
96     src/window.c
97
98     src/share/win_utf8_io/win_utf8_io.c
99 )
100
101 if(MSVC AND "${CMAKE_C_COMPILER_ID}" MATCHES "Clang" AND NOT TIM41_USE_AVX2)
102     set_source_files_properties(
103         src/lpc_intrin_avx2.c src/stream_encoder_intrin_avx2.c
104         PROPERTIES
105             COMPILE_OPTIONS /arch:AVX2
106     )
107 endif()
108
109 target_link_libraries(FLAC ogg)
110
111 install(TARGETS FLAC)