]> git.sesse.net Git - vlc/blob - extras/buildsystem/cmake/CMakeLists/test_CMakeLists.txt
Merge branch 'master' of git@git.videolan.org:vlc
[vlc] / extras / buildsystem / cmake / CMakeLists / test_CMakeLists.txt
1
2 add_executable(test_libvlc_core              libvlc/core.c)
3 add_executable(test_libvlc_events            libvlc/events.c)
4 add_executable(test_libvlc_media_player      libvlc/media_player.c
5                                              samples/test.sample)
6 add_executable(test_libvlc_media_list        libvlc/media_list.c)
7 add_executable(test_libvlc_media_list_player libvlc/media_list_player.c
8                                              samples/test.sample)
9
10 target_link_libraries(test_libvlc_core               libvlc-control)
11 target_link_libraries(test_libvlc_events             libvlc-control)
12 target_link_libraries(test_libvlc_media_player       libvlc-control)
13 target_link_libraries(test_libvlc_media_list         libvlc-control)
14 target_link_libraries(test_libvlc_media_list_player  libvlc-control)
15
16 set(SAMPLES_SERVER http://streams.videolan.org/streams-videolan/reference)
17
18 add_custom_command(
19    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/samples/test.sample
20    COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/samples
21    COMMAND curl -L ${SAMPLES_SERVER}/avi/Hero-Div3.avi > ${CMAKE_CURRENT_BINARY_DIR}/samples/test.sample
22 )
23
24 add_test(test_libvlc_core
25     ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_core)
26 add_test(test_libvlc_events
27     ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_events)
28 add_test(test_libvlc_media_player
29     ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_media_player)
30 add_test(test_libvlc_media_list
31     ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_media_list)
32 add_test(test_libvlc_media_list_player
33     ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_media_list_player)
34