]> git.sesse.net Git - casparcg/blob - unit-test/CMakeLists.txt
Remove all Bluefish444.
[casparcg] / unit-test / CMakeLists.txt
1 cmake_minimum_required (VERSION 2.6)
2 project (unit-test)
3
4 set(SOURCES
5                 audio_channel_layout_test.cpp
6                 base64_test.cpp
7                 image_mixer_test.cpp
8                 main.cpp
9                 param_test.cpp
10                 stdafx.cpp
11                 tweener_test.cpp
12 )
13 set(HEADERS
14                 stdafx.h
15 )
16
17 add_executable(unit-test ${SOURCES} ${HEADERS})
18 add_precompiled_header(unit-test stdafx.h FORCEINCLUDE)
19
20 target_link_libraries(unit-test
21                 accelerator
22                 common
23                 core
24                 ffmpeg
25 )
26
27 if (MSVC)
28         target_link_libraries(unit-test
29                 optimized gtest.lib
30                 debug gtestd.lib
31         )
32 else ()
33         target_link_libraries(unit-test
34                 gtest
35         )
36 endif ()
37
38 include_directories(..)
39 include_directories(${BOOST_INCLUDE_PATH})
40 include_directories(${RXCPP_INCLUDE_PATH})
41 include_directories(${TBB_INCLUDE_PATH})
42 include_directories(${GTEST_INCLUDE_PATH})
43
44 source_group(sources ./*)
45
46 set(OUTPUT_FOLDER "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}")
47
48 foreach(FILE_TO_COPY ${CASPARCG_RUNTIME_DEPENDENCIES})
49         if(IS_DIRECTORY ${FILE_TO_COPY})
50                 get_filename_component(FOLDER_NAME "${FILE_TO_COPY}" NAME)
51                 add_custom_command(TARGET unit-test POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory \"${FILE_TO_COPY}\" \"${OUTPUT_FOLDER}/${FOLDER_NAME}\")
52                 add_custom_command(TARGET unit-test POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory \"${FILE_TO_COPY}\" \"${CMAKE_CURRENT_BINARY_DIR}/${FOLDER_NAME}\")
53         else()
54                 add_custom_command(TARGET unit-test POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy \"${FILE_TO_COPY}\" \"${OUTPUT_FOLDER}/\")
55                 add_custom_command(TARGET unit-test POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy \"${FILE_TO_COPY}\" \"${CMAKE_CURRENT_BINARY_DIR}/\")
56         endif()
57 endforeach(FILE_TO_COPY)