1 include_directories( . )
3 add_definitions(-Dasm=__asm__ -D_INTL_REDIRECT_MACROS)
4 add_definitions(-DLOCALEDIR=\\"${CMAKE_INSTALL_PREFIX}/locale\\")
5 add_definitions(-DDATA_PATH=\\"${CMAKE_INSTALL_PREFIX}/share/vlc\\")
6 add_definitions(-DPLUGIN_PATH=\\"${CMAKE_INSTALL_PREFIX}/lib/vlc\\")
9 add_executable(vlc vlc.c)
10 target_link_libraries(vlc libvlc)
12 install_targets(/bin vlc)
16 set( SOURCES_libvlc_beos misc/beos_specific.cpp )
17 set( SOURCES_libvlc_darwin misc/darwin_specific.c )
18 set( SOURCES_libvlc_win32 misc/win32_specific.c )
19 set( SOURCES_libvlc_dirent extras/dirent.c )
20 set( SOURCES_libvlc_getopt misc/getopt.c misc/getopt.h misc/getopt1.c )
21 set( SOURCES_libvlc_common
28 interface/intf_eject.c
29 interface/interaction.c
30 playlist/playlist_internal.h
39 playlist/services_discovery.c
45 input/decoder_synchro.c
50 input/input_internal.h
56 video_output/video_output.c
57 video_output/vout_pictures.c
58 video_output/vout_pictures.h
59 video_output/video_text.c
60 video_output/video_widgets.c
61 video_output/vout_subpictures.c
62 video_output/vout_intf.c
63 audio_output/aout_internal.h
66 audio_output/filters.c
71 stream_output/stream_output.c
72 stream_output/stream_output.h
73 stream_output/announce.c
74 stream_output/profiles.c
100 ${CMAKE_BINARY_DIR}/src/modules/builtin.h
109 config/configuration.h
122 ${CMAKE_BINARY_DIR}/src/misc/revision.c
127 ${CMAKE_BINARY_DIR}/include/vlc_about.h )
129 set( SOURCES_libvlc ${SOURCES_libvlc_common} )
132 set( SOURCES_libvlc ${SOURCES_libvlc} ${SOURCES_libvlc_darwin} )
135 add_library(libvlc SHARED ${SOURCES_libvlc})
136 install_targets(/lib libvlc)
139 set( SOURCES_libvlc_control
140 control/libvlc_internal.h
147 control/dynamic_media_list.c
149 control/flat_media_list_view.c
150 control/hierarchical_media_list_view.c
151 control/hierarchical_node_media_list_view.c
152 control/media_descriptor.c
153 control/media_instance.c
155 control/media_list_path.h
156 control/media_list_player.c
157 control/media_list_view.c
158 control/media_library.c
159 control/mediacontrol_internal.h
160 control/mediacontrol_core.c
161 control/mediacontrol_util.c
162 control/mediacontrol_audio_video.c
163 control/media_discoverer.c
164 control/tag_query.c )
166 add_library(libvlc-control SHARED ${SOURCES_libvlc_control})
167 install_targets(/lib libvlc-control)
168 target_link_libraries(libvlc-control libvlc)
170 ##########################################################
174 target_link_libraries(libvlc ${LIBICONV})
178 find_library(CARBON_FRAMEWORK Carbon)
179 target_link_libraries(libvlc ${CARBON_FRAMEWORK})
182 ##########################################################
185 set(rev "${CMAKE_BINARY_DIR}/src/misc/revision.c")
188 COMMAND rm -f ${rev} ${rev}.tmp
189 COMMAND mkdir -p `dirname ${rev}`
190 COMMAND echo "/* AUTOGENERATED FILE - DO NOT EDIT */" > ${rev}.tmp
191 COMMAND printf "const char psz_vlc_changeset[] = \"" >> ${rev}.tmp
192 COMMAND sh -c "printf `LANG=C svnversion ${CMAKE_SOURCE_DIR} || printf \"exported\"`" >> ${rev}.tmp
193 COMMAND echo "\";" >> ${rev}.tmp
194 COMMAND mv -f ${rev}.tmp ${rev}
199 ##########################################################
201 # No real use for this one, we just used to need it.
202 # We should really remove that.
203 set(builtin "${CMAKE_BINARY_DIR}/src/modules/builtin.h")
207 COMMAND mkdir -p `dirname ${builtin}`
208 COMMAND echo "/* Auto generated by ${CMAKE_CURRENT_BUILD_DIR}/CMakeLists.txt */" > ${builtin}
209 COMMAND echo "int vlc_entry__main( module_t* );" >> ${builtin}
210 COMMAND echo "#define ALLOCATE_ALL_BUILTINS() do {} while(0)" >> ${builtin}
215 ##########################################################
217 set(about "${CMAKE_BINARY_DIR}/include/vlc_about.h")
221 COMMAND rm -f -- "${about}.tmp"
222 COMMAND mkdir -p `dirname ${about}`
223 COMMAND mkdir -p -- ../include
224 COMMAND echo "/* Automatically generated file - DO NOT EDIT */" > "${about}.tmp"
225 COMMAND echo "static const char psz_license[] =" >> "${about}.tmp"
226 COMMAND cat ${CMAKE_SOURCE_DIR}/COPYING | sed s/\"/''/g | awk "{ print \"\\\"\"$0\"\\\\n\\\"\" }" >> "${about}.tmp"
227 COMMAND echo ";" >> "${about}.tmp"
228 COMMAND echo "static const char psz_thanks[] =" >> "${about}.tmp"
229 COMMAND grep -v '$$Id:' ${CMAKE_SOURCE_DIR}/THANKS | sed "s/\"/''/g" | awk "{ print \"\\\"\"$0\"\\\\n\\\"\" }"|sed "s/\"<.*.> \"//" >> "${about}.tmp"
230 COMMAND echo ";" >> "${about}.tmp"
231 COMMAND echo "static const char psz_authors[] =" >> "${about}.tmp"
232 COMMAND grep N: ${CMAKE_SOURCE_DIR}/AUTHORS | cut -d "\ " -f 2- | sed "s/\"/''/g" | awk "{ print \"\\\"\"$0\"\\\\n\\\"\" }" >> "${about}.tmp"
233 COMMAND echo ";" >> "${about}.tmp"
234 COMMAND mv -f -- "${about}.tmp" "${about}"
235 DEPENDS ${CMAKE_SOURCE_DIR}/AUTHORS ${CMAKE_SOURCE_DIR}/THANKS ${CMAKE_SOURCE_DIR}/COPYING
240 ##########################################################
241 # SET_TARGET_PROPERTIES
243 # FIXME: Should probably be autodetected in configure?
245 set(LINK_FLAGS "-z defs --as-needed")
248 target_link_libraries(libvlc ${LIBRT} ${LIBICONV} ${Dlopen_LIBRARIES})
249 target_link_libraries(libvlc ${LIBM})
251 set_target_properties(libvlc PROPERTIES SOVERSION 1.0.0)
252 set_target_properties(libvlc libvlc-control PROPERTIES PREFIX "")
253 set_target_properties(libvlc libvlc-control PROPERTIES LINK_FLAGS "${LINK_FLAGS} ${CMAKE_THREAD_LIBS_INIT}")
254 set_target_properties(libvlc libvlc-control vlc PROPERTIES COMPILE_FLAGS
255 "-Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wmissing-prototypes -I${CMAKE_BINARY_DIR}/src -I${CMAKE_BINARY_DIR}/include" )