+project(mv_barcode_assessment)
cmake_minimum_required(VERSION 2.6)
-set(fw_name "mv_barcode_assessment")
-
-project(${fw_name})
-
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
-
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-include_directories(${PROJECT_SOURCE_DIR})
-include_directories(${MV_CAPI_MEDIA_VISION_INC_DIR})
-
-file(GLOB MV_BARCODE_ASSESSMENT_SRC_LIST "${PROJECT_SOURCE_DIR}/assessment_barcode.cpp")
-
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
-
-add_executable(${PROJECT_NAME} ${MV_BARCODE_ASSESSMENT_SRC_LIST} ${MV_CAPI_MEDIA_VISION_INC_LIST})
+add_executable(${PROJECT_NAME} assessment_barcode.cpp)
target_link_libraries(${PROJECT_NAME} ${MV_BARCODE_DETECTOR_LIB_NAME}
- ${${fw_name}_LDFLAGS}
${MV_BARCODE_GENERATOR_LIB_NAME}
dlog
)
+project(mv_face_assessment)
cmake_minimum_required(VERSION 2.6)
-set(fw_name "mv_face_assessment")
-project(${fw_name})
-
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
-
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-include_directories(${PROJECT_SOURCE_DIR})
-include_directories(${MV_CAPI_MEDIA_VISION_INC_DIR})
-
-file(GLOB MV_FACE_ASSESSMENT_SRC_LIST "${PROJECT_SOURCE_DIR}/assessment_face.cpp")
-
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
-
-find_package(PkgConfig REQUIRED)
-pkg_check_modules(OPENCV opencv4)
-if (NOT OPENCV_FOUND)
+find_package(OpenCV REQUIRED imgcodecs)
+if(NOT OpenCV_FOUND)
message(SEND_ERROR "Failed to find opencv")
return()
-else()
- include_directories(${OPENCV_INCLUDE_DIRS})
endif()
-
-add_executable(${PROJECT_NAME} ${MV_FACE_ASSESSMENT_SRC_LIST} ${MV_CAPI_MEDIA_VISION_INC_LIST})
-
-target_link_libraries(${PROJECT_NAME} ${${fw_name}_LDFLAGS}
- ${MV_FACE_LIB_NAME}
- ${OPENCV_LDFLAGS}
- mv_common
- dlog)
+add_executable(${PROJECT_NAME} assessment_face.cpp)
+target_link_libraries(${PROJECT_NAME}
+ ${MV_FACE_LIB_NAME}
+ ${OpenCV_LIBRARIES}
+ mv_common
+ dlog)
install(TARGETS ${PROJECT_NAME} DESTINATION ${testbin_dir})
cmake_minimum_required(VERSION 2.6)
-set(fw_name "mv_surveillance_assessment")
+project(mv_surveillance_assessment)
-project(${fw_name})
-
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
-
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-include_directories(${PROJECT_SOURCE_DIR})
-include_directories(${MV_CAPI_MEDIA_VISION_INC_DIR})
-
-file(GLOB MV_SURVEILLANCE_ASSESSMENT_SRC_LIST "${PROJECT_SOURCE_DIR}/assessment_surveillance.cpp")
-
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
-
-find_package(PkgConfig REQUIRED)
-pkg_check_modules(OPENCV opencv4)
-if (NOT OPENCV_FOUND)
+find_package(OpenCV REQUIRED videoio xfeatures2d)
+if(NOT OpenCV_FOUND)
message(SEND_ERROR "Failed to find opencv")
return()
-else()
- include_directories(${OPENCV_INCLUDE_DIRS})
endif()
-
-add_executable(${PROJECT_NAME} ${MV_SURVEILLANCE_ASSESSMENT_SRC_LIST} ${MV_CAPI_MEDIA_VISION_INC_LIST})
-
-target_link_libraries(${PROJECT_NAME} ${${fw_name}_LDFLAGS}
+add_executable(${PROJECT_NAME} assessment_surveillance.cpp)
+target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBRARIES}
${MV_SURVEILLANCE_LIB_NAME}
- ${OPENCV_LDFLAGS}
mv_common
dlog)
+project(mv_barcode_test_suite)
cmake_minimum_required(VERSION 2.6)
-set(fw_name "mv_barcode_test_suite")
-project(${fw_name})
-
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
-
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-include_directories(${PROJECT_SOURCE_DIR})
-include_directories(${MV_CAPI_MEDIA_VISION_INC_DIR})
-include_directories(${INC_IMAGE_HELPER})
-
-set(DEPENDENTS "ncurses")
-include(FindPkgConfig)
-pkg_check_modules(${fw_name} REQUIRED ${DEPENDENTS})
-foreach(flag ${${fw_name}_CFLAGS})
- set(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
- set(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
-endforeach(flag)
-
-
-file(GLOB MV_TEST_SUITE_INC_LIST "${PROJECT_SOURCE_DIR}/*.h")
-file(GLOB MV_TEST_SUITE_SRC_LIST "${PROJECT_SOURCE_DIR}/test_barcode.c")
-
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE")
-
-add_executable(${PROJECT_NAME} ${MV_TEST_SUITE_SRC_LIST} ${MV_TEST_SUITE_INC_LIST} ${MV_CAPI_MEDIA_VISION_INC_LIST})
+pkg_check_modules(${PROJECT_NAME}_DEP REQUIRED ncurses capi-system-info
+dlog check)
+add_executable(${PROJECT_NAME} test_barcode.c)
target_link_libraries(${PROJECT_NAME} ${MV_BARCODE_DETECTOR_LIB_NAME}
- ${${fw_name}_LDFLAGS}
- ${MV_BARCODE_GENERATOR_LIB_NAME}
- capi-system-info
- dlog
- avcodec
- avformat
- avutil
- swscale
- mv_image_helper
- check
- )
+${MV_BARCODE_GENERATOR_LIB_NAME} ${${PROJECT_NAME}_DEP_LIBRARIES}
+avcodec avformat avutil swscale mv_image_helper
+)
install(TARGETS ${PROJECT_NAME} DESTINATION ${testbin_dir})
install(FILES mv_barcode_test_suite_auto PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ DESTINATION ${testbin_dir})
-project(mv_testsuites_common)
-cmake_minimum_required(VERSION 2.6)
-
-add_subdirectory(${PROJECT_SOURCE_DIR}/image_helper)
-add_subdirectory(${PROJECT_SOURCE_DIR}/video_helper)
-add_subdirectory(${PROJECT_SOURCE_DIR}/testsuite_common)
+add_subdirectory(image_helper)
+add_subdirectory(video_helper)
+add_subdirectory(testsuite_common)
project(mv_image_helper)
cmake_minimum_required(VERSION 2.6)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
-
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-include_directories("${PROJECT_SOURCE_DIR}/include")
-
-file(GLOB MV_IMAGE_HELPER_INCLUDE_LIST "${PROJECT_SOURCE_DIR}/include/*.h")
file(GLOB MV_IMAGE_HELPER_SRC_LIST "${PROJECT_SOURCE_DIR}/src/*.c"
"${PROJECT_SOURCE_DIR}/src/*.cpp")
if(NOT OpenCV_FOUND)
message(SEND_ERROR "Failed to find OpenCV")
return()
-else()
- include_directories(${OpenCV_INCLUDE_DIRS})
endif()
if(FORCED_STATIC_BUILD)
- add_library(${PROJECT_NAME} STATIC ${MV_IMAGE_HELPER_INCLUDE_LIST} ${MV_IMAGE_HELPER_SRC_LIST})
+ add_library(${PROJECT_NAME} STATIC ${MV_IMAGE_HELPER_SRC_LIST})
else()
- add_library(${PROJECT_NAME} SHARED ${MV_IMAGE_HELPER_INCLUDE_LIST} ${MV_IMAGE_HELPER_SRC_LIST})
+ add_library(${PROJECT_NAME} SHARED ${MV_IMAGE_HELPER_SRC_LIST})
endif()
+target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/include ${OpenCV_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})
install(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})
-set (pkgname mv_testsuite_common)
-project(${pkgname})
-
+project(mv_testsuite_common)
cmake_minimum_required(VERSION 2.6)
-set(INC_DIR include)
-include_directories(${INC_DIR})
-include_directories(${INC_IMAGE_HELPER})
-include_directories(${INC_VIDEO_HELPER})
-
-add_library(${pkgname} SHARED "mv_testsuite_common.c" "mv_testsuite_common.h")
-
-target_link_libraries(${pkgname} ${MV_COMMON_LIB_NAME} mv_image_helper)
+add_library(${PROJECT_NAME} SHARED mv_testsuite_common.c)
+target_link_libraries(${PROJECT_NAME} ${MV_COMMON_LIB_NAME} mv_image_helper)
+target_include_directories(${PROJECT_NAME} PUBLIC . ${INC_VIDEO_HELPER})
install(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})
-set (pkgname mv_video_helper)
-project(${pkgname})
-
+project(mv_video_helper)
cmake_minimum_required(VERSION 2.6)
-set(INC_DIR include)
-include_directories(${INC_DIR})
-include_directories(${INC_IMAGE_HELPER})
-
-set(dependents "gstreamer-1.0 gstreamer-app-1.0 dlog")
-
-include(FindPkgConfig)
-pkg_check_modules(${pkgname} REQUIRED ${dependents})
-foreach(flag ${${pkgname}_CFLAGS})
- set(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-endforeach(flag)
-
-set(CMAKE_C_FLAGS "-I./include -I./include/headers ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall")
-set(CMAKE_C_FLAGS_DEBUG "-O0 -g")
-
-add_library(${pkgname} SHARED "mv_video_helper.c" "mv_video_helper.h")
+pkg_check_modules(${PROJECT_NAME}_DEP REQUIRED gstreamer-1.0 gstreamer-app-1.0 gstreamer-video-1.0 dlog)
-target_link_libraries(${pkgname} ${${pkgname}_LDFLAGS} gstvideo-1.0)
+add_library(${PROJECT_NAME} SHARED mv_video_helper.c)
+target_link_libraries(${PROJECT_NAME} ${${PROJECT_NAME}_DEP_LIBRARIES})
+target_include_directories(${PROJECT_NAME} PUBLIC ${INC_IMAGE_HELPER} ${${PROJECT_NAME}_DEP_INCLUDE_DIRS})
install(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})
project(mv_face_test_suite)
cmake_minimum_required(VERSION 2.6)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
-
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-include_directories(${PROJECT_SOURCE_DIR})
-include_directories(${MV_CAPI_MEDIA_VISION_INC_DIR})
-include_directories(${INC_IMAGE_HELPER})
-include_directories(${INC_VIDEO_HELPER})
-include_directories(${INC_TS_COMMON})
-
-file(GLOB MV_FACE_TEST_SUITE_INC_LIST "${PROJECT_SOURCE_DIR}/*.h")
-file(GLOB MV_FACE_TEST_SUITE_SRC_LIST "${PROJECT_SOURCE_DIR}/*.c")
-
-add_executable(${PROJECT_NAME}
- ${MV_FACE_TEST_SUITE_INC_LIST}
- ${MV_FACE_TEST_SUITE_SRC_LIST}
- ${MV_CAPI_MEDIA_VISION_INC_LIST})
-
+add_executable(${PROJECT_NAME} face_test_suite.c)
target_link_libraries(${PROJECT_NAME} ${MV_FACE_LIB_NAME}
capi-system-info
dlog
project(mv_image_test_suite)
cmake_minimum_required(VERSION 2.6)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
-
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-include_directories(${PROJECT_SOURCE_DIR})
-include_directories(${MV_CAPI_MEDIA_VISION_INC_DIR})
-include_directories(${INC_IMAGE_HELPER})
-include_directories(${INC_VIDEO_HELPER})
-include_directories(${INC_TS_COMMON})
-
-file(GLOB MV_TEST_SUITE_INC_LIST "${PROJECT_SOURCE_DIR}/*.h")
-file(GLOB MV_TEST_SUITE_SRC_LIST "${PROJECT_SOURCE_DIR}/*.c")
-
-find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB_PKG glib-2.0)
if (NOT GLIB_PKG_FOUND)
message(SEND_ERROR "Failed to find glib")
return()
-else()
- include_directories(${GLIB_PKG_INCLUDE_DIRS})
endif()
-add_executable(${PROJECT_NAME} ${MV_TEST_SUITE_SRC_LIST} ${MV_TEST_SUITE_INC_LIST} ${MV_CAPI_MEDIA_VISION_INC_LIST})
-
+add_executable(${PROJECT_NAME} image_test_suite.c)
target_link_libraries(${PROJECT_NAME} ${MV_IMAGE_LIB_NAME}
+ ${GLIB_PKG_LIBRARIES}
capi-system-info
- glib-2.0
mv_image_helper
mv_video_helper
mv_testsuite_common)
project(mv_infer_test_suite)
cmake_minimum_required(VERSION 2.6)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
-
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-include_directories(${PROJECT_SOURCE_DIR})
-include_directories(${MV_CAPI_MEDIA_VISION_INC_DIR})
-include_directories(${INC_IMAGE_HELPER})
-include_directories(${INC_VIDEO_HELPER})
-include_directories(${INC_TS_COMMON})
-
-message("TESTSUITE: ${MV_CAPI_MEDIA_VISION_INC_DIR}")
-
-file(GLOB MV_INFER_TEST_SUITE_INC_LIST "${PROJECT_SOURCE_DIR}/*.h")
-file(GLOB MV_INFER_TEST_SUITE_SRC_LIST "${PROJECT_SOURCE_DIR}/*.c")
-
-add_executable(${PROJECT_NAME}
- ${MV_INFER_TEST_SUITE_INC_LIST}
- ${MV_INFER_TEST_SUITE_SRC_LIST}
- ${MV_CAPI_MEDIA_VISION_INC_LIST})
+add_executable(${PROJECT_NAME} inference_test_suite.c)
target_link_libraries(${PROJECT_NAME} mv_inference
mv_image_helper
project(mv_surveillance_test_suite)
cmake_minimum_required(VERSION 2.6)
-set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG _DEBUG)
-
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${LIB_INSTALL_DIR})
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
-
-include_directories(${PROJECT_SOURCE_DIR})
-include_directories(${MV_CAPI_MEDIA_VISION_INC_DIR})
-include_directories(${INC_TS_COMMON})
-include_directories(${INC_VIDEO_HELPER})
-include_directories(${INC_IMAGE_HELPER})
-
-file(GLOB MV_SURVEILLANCE_TS_INC_LIST "${PROJECT_SOURCE_DIR}/*.h")
-file(GLOB MV_SURVEILLANCE_TS_SRC_LIST "${PROJECT_SOURCE_DIR}/*.c")
-
-add_executable(${PROJECT_NAME} ${MV_SURVEILLANCE_TS_SRC_LIST}
- ${MV_SURVEILLANCE_TS_INC_LIST}
- ${MV_CAPI_MEDIA_VISION_INC_LIST})
-
+add_executable(${PROJECT_NAME} surveillance_test_suite.c)
target_link_libraries(${PROJECT_NAME} ${MV_SURVEILLANCE_LIB_NAME}
capi-system-info
mv_testsuite_common