Cmake : disable samples downloading & related tests
[vlc.git] / 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 #add_executable(test_libvlc_meta              libvlc/meta.c
10 #                                             samples/meta.sample)
11
12 target_link_libraries(test_libvlc_core               libvlc)
13 target_link_libraries(test_libvlc_events             libvlc)
14 target_link_libraries(test_libvlc_media_player       libvlc)
15 target_link_libraries(test_libvlc_media_list         libvlc)
16 target_link_libraries(test_libvlc_media_list_player  libvlc)
17 target_link_libraries(test_libvlc_meta               libvlc)
18
19 set(SAMPLES_SERVER http://streams.videolan.org/streams-videolan/reference)
20
21 MACRO(download_sample sample dest)
22   add_custom_command(
23    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${dest}
24    COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/samples
25    COMMAND curl -L ${SAMPLES_SERVER}/${sample} > ${CMAKE_CURRENT_BINARY_DIR}/${dest}
26   )
27 ENDMACRO(download_sample)
28
29 #download_sample(avi/Hero-Div3.avi samples/test.sample)
30 #download_sample(metadata/id3tag/Wesh-Bonneville.mp3 samples/meta.sample)
31
32 add_test(test_libvlc_core
33     ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_core)
34 add_test(test_libvlc_events
35     ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_events)
36 add_test(test_libvlc_media_player
37     ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_media_player)
38 add_test(test_libvlc_media_list
39     ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_media_list)
40 add_test(test_libvlc_media_list_player
41     ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_media_list_player)
42 add_test(test_libvlc_meta
43     ${CMAKE_CURRENT_BINARY_DIR}/test_libvlc_meta)
44