c993b6059a
Also updates main CMakeLists.txt and CMakeLists.txt for unit tests, also adds additional build directories to .gitignore file
24 lines
901 B
CMake
24 lines
901 B
CMake
project(obs-cmocka)
|
|
|
|
find_package(CMocka CONFIG REQUIRED)
|
|
|
|
# Serializer test
|
|
add_executable(test_serializer test_serializer.c)
|
|
target_include_directories(test_serializer PRIVATE ${CMOCKA_INCLUDE_DIR})
|
|
target_link_libraries(test_serializer PRIVATE OBS::libobs ${CMOCKA_LIBRARIES})
|
|
add_test(test_serializer ${CMAKE_CURRENT_BINARY_DIR}/test_serializer)
|
|
|
|
# darray test
|
|
add_executable(test_darray test_darray.c)
|
|
target_include_directories(test_darray PRIVATE ${CMOCKA_INCLUDE_DIR})
|
|
target_link_libraries(test_darray PRIVATE OBS::libobs ${CMOCKA_LIBRARIES})
|
|
|
|
add_test(test_darray ${CMAKE_CURRENT_BINARY_DIR}/test_darray)
|
|
|
|
# bitstream test
|
|
add_executable(test_bitstream test_bitstream.c)
|
|
target_include_directories(test_bitstream PRIVATE ${CMOCKA_INCLUDE_DIR})
|
|
target_link_libraries(test_bitstream PRIVATE OBS::libobs ${CMOCKA_LIBRARIES})
|
|
|
|
add_test(test_bitstream ${CMAKE_CURRENT_BINARY_DIR}/test_bitstream)
|