CMakeLists.txt 1.3 KB

123456789101112131415161718192021222324
  1. set(test_srcs "")
  2. list(APPEND test_srcs ${PROJECT_SOURCE_DIR}/tools/web_visualize/unitest/test_main.cpp)
  3. list(APPEND test_srcs ${PROJECT_SOURCE_DIR}/tools/web_visualize/unitest/test_PyCNService.cpp)
  4. include_directories(${PROJECT_SOURCE_DIR}/tools/web_visualize/src/pycnstream_backend)
  5. file(GLOB_RECURSE test_pycnstream_backend_srcs ${PROJECT_SOURCE_DIR}/tools/web_visualize/src/pycnstream_backend/*.cpp)
  6. list(APPEND test_srcs ${test_pycnstream_backend_srcs})
  7. aux_source_directory(${PROJECT_SOURCE_DIR}/samples/common/preprocess preprocess_srcs)
  8. list(APPEND test_srcs ${preprocess_srcs})
  9. aux_source_directory(${PROJECT_SOURCE_DIR}/samples/common/postprocess postprocess_srcs)
  10. list(APPEND test_srcs ${postprocess_srcs})
  11. include_directories("${PROJECT_SOURCE_DIR}/samples/common")
  12. file(GLOB_RECURSE util_src ${PROJECT_SOURCE_DIR}/samples/common/util.cpp)
  13. list(APPEND test_srcs ${util_src})
  14. # pybind11_add_module(web_test SHARED ${test_srcs})
  15. find_package(PythonLibs REQUIRED)
  16. include_directories(${PYTHON_INCLUDE_DIR})
  17. #message(${PYTHON_INCLUDE_DIR})
  18. #message(${PYTHON_LIBRARY})
  19. add_executable(web_test ${test_srcs})
  20. target_link_libraries(web_test gtest dl cnstream_core pycnservice ${PYTHON_LIBRARY} cnstream_va ${CN_LIBS} ${3RDPARTY_LIBS} ${OpenCV_LIBS} ${FFMPEG_LIBRARIES} pthread)
  21. add_test(web_test ${EXECUTABLE_OUTPUT_PATH}/web_test)