2021-06-24 10:12:55 +08:00
|
|
|
project(haltest C CXX)
|
2022-11-30 17:11:10 +08:00
|
|
|
find_package(GTEST REQUIRED)
|
2021-06-24 10:12:55 +08:00
|
|
|
set(SRCS_NORMAL
|
|
|
|
event_unittests.cc
|
|
|
|
mem_unittests.cc
|
|
|
|
sem_unittests.cc
|
|
|
|
graph_unittest.cc
|
|
|
|
msgq_unittests.cc
|
|
|
|
testmain.cc
|
|
|
|
input_unittests.cc
|
|
|
|
mutex_unittests.cc
|
|
|
|
timer_unittests.cc
|
|
|
|
)
|
|
|
|
set(SRCS_DTV
|
|
|
|
tvtestutils.cc
|
|
|
|
dmx_unittests.cc
|
|
|
|
tspes_unittests.cc
|
|
|
|
av_unittests.cc
|
|
|
|
tuner_unittests.cc)
|
|
|
|
|
|
|
|
set(SRCS_HAL ${SRCS_NORMAL})
|
|
|
|
if ( ENABLE_DTV )
|
|
|
|
set(SRCS_HAL ${SRCS_NORMAL} ${SRCS_DTV})
|
|
|
|
endif(ENABLE_DTV)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
./
|
2022-11-30 17:11:10 +08:00
|
|
|
${GTEST_INCLUDE_DIRS}
|
2022-12-23 11:39:34 +08:00
|
|
|
${CMAKE_BINARY_DIR}/include
|
|
|
|
${CMAKE_BINARY_DIR}/include/gui
|
|
|
|
${CMAKE_BINARY_DIR}/include/porting
|
2024-10-16 15:30:47 +08:00
|
|
|
${CMAKE_SOURCE_DIR}/src/porting/include
|
2021-06-24 10:12:55 +08:00
|
|
|
)
|
|
|
|
|
2022-12-23 11:39:34 +08:00
|
|
|
link_directories(${CMAKE_BINARY_DIR}/lib)
|
2021-06-24 10:12:55 +08:00
|
|
|
|
|
|
|
add_executable(hal_tests ${SRCS_HAL})
|
|
|
|
|
2024-10-16 15:30:47 +08:00
|
|
|
target_link_libraries(hal_tests tvhal ${PTHREAD_LIBRARIES} ${GTEST_LIBRARIES})
|
2021-06-24 10:12:55 +08:00
|
|
|
|
|
|
|
install (TARGETS hal_tests DESTINATION bin/tests)
|