src_CMakeLists.txt 3.67 KB
Newer Older
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
include_directories( . )

add_definitions(-Dasm=__asm__ -D_INTL_REDIRECT_MACROS -DMACOSX_DEPLOYMENT_TARGET=10.4 -mmacosx-version-min=10.4)

# vlc
add_executable(vlc vlc.c)
target_link_libraries(vlc libvlc)

install_programs(/bin FILES vlc)

# libvlc

set( SOURCES_libvlc_beos misc/beos_specific.cpp )
set( SOURCES_libvlc_darwin misc/darwin_specific.c )
set( SOURCES_libvlc_win32 misc/win32_specific.c )
set( SOURCES_libvlc_dirent extras/dirent.c )
set( SOURCES_libvlc_getopt misc/getopt.c misc/getopt.h misc/getopt1.c )
set( SOURCES_libvlc_common
    libvlc.c
	libvlc-common.c
	libvlc.h
	libvlc-module.c
	interface/interface.h
	interface/interface.c
	interface/intf_eject.c
	interface/interaction.c
	playlist/playlist_internal.h
	playlist/thread.c
	playlist/control.c
	playlist/engine.c
	playlist/sort.c
	playlist/loadsave.c
	playlist/tree.c
	playlist/item.c
	playlist/search.c
	playlist/services_discovery.c
	input/item.c
	input/access.c
	input/clock.c
	input/control.c
	input/decoder.c
	input/decoder_synchro.c
	input/demux.c
	input/es_out.c
	input/input.c
	input/meta.c
	input/input_internal.h
	input/vlm_internal.h
	input/stream.c
	input/mem_stream.c
	input/subtitles.c
	input/var.c
	video_output/video_output.c
	video_output/vout_pictures.c
	video_output/vout_pictures.h
	video_output/video_text.c
	video_output/video_widgets.c
	video_output/vout_subpictures.c
	video_output/vout_intf.c
	audio_output/aout_internal.h
	audio_output/common.c
	audio_output/dec.c
	audio_output/filters.c
	audio_output/input.c
	audio_output/mixer.c
	audio_output/output.c
	audio_output/intf.c
	stream_output/stream_output.c
	stream_output/stream_output.h
	stream_output/announce.c
	stream_output/profiles.c
	stream_output/sap.c
	stream_output/sdp.c
	osd/osd.c
	osd/osd_text.c
	osd/osd_widgets.c
	network/acl.c
	network/getaddrinfo.c
	network/io.c
	network/error.c
	network/tcp.c
	network/udp.c
	network/httpd.c
	network/rootwrap.c
	network/tls.c
	network/poll.c
	text/charset.c
	text/strings.c
	text/unicode.c
	text/wincp.c
	text/iso_lang.c
	text/iso-639_def.h
	misc/md5.c
	misc/rand.c
	misc/mtime.c
	misc/block.c
	modules/modules.h
	modules/modules.c
	modules/cache.c
	modules/entry.c
	modules/os.c
	misc/threads.c
	misc/stats.c
	misc/cpu.c
	config/configuration.h
	config/core.c
	config/chain.c
	config/file.c
	config/cmdline.c
	misc/events.c
	misc/image.c
	misc/messages.c
	misc/objects.c
	misc/variables.h
	misc/variables.c
	misc/error.c
	misc/update.c
	misc/revision.c
	input/vlm.c
	misc/xml.c
	misc/devices.c
	extras/libc.c )

set( SOURCES_libvlc ${SOURCES_libvlc_common} )

if(SYS_DARWIN)
    set( SOURCES_libvlc ${SOURCES_libvlc} ${SOURCES_libvlc_darwin} )
endif(SYS_DARWIN)

add_library(libvlc SHARED ${SOURCES_libvlc})
install_targets(/lib libvlc)

##########################################################
# Libraries

# iconv
target_link_libraries(libvlc ${HAVE_ICONV})

# Carbon
find_library(CARBON_FRAMEWORK Carbon)
target_link_libraries(libvlc ${CARBON_FRAMEWORK})

##########################################################
# version.c

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/foo.c
COMMAND sh "rm -f misc/revision.c misc/revision.c.tmp &&
    echo '/* AUTOGENERATED FILE - DO NOT EDIT */' > misc/revision.c.tmp &&
    REVISION=\"$$\(LANG=C svnversion \\\"$\(top_srcdir)\\\" 2>/dev/null || echo exported)\" ; &&
    echo \"const char psz_vlc_changeset[] = \\\"$$REVISION\\\";\" >> misc/revision.c.tmp &&
    mv -f misc/revision.c.tmp misc/revision.c"
)

##########################################################
# SET_TARGET_PROPERTIES

set_target_properties(libvlc vlc PROPERTIES COMPILE_FLAGS
    "-std=c99 -I. -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes" )