CMakeLists.txt 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/)
  2. include_directories(${3RDPARTY_INCLUDE_DIRS})
  3. set(module_list "")
  4. if(build_inference)
  5. list(APPEND module_list inference)
  6. install(DIRECTORY inference/include/ DESTINATION include)
  7. endif()
  8. if(build_inifile)
  9. list(APPEND module_list inifile)
  10. install(DIRECTORY inifile/include/ DESTINATION include)
  11. endif()
  12. if(build_md5)
  13. list(APPEND module_list md5)
  14. install(DIRECTORY md5/include/ DESTINATION include)
  15. endif()
  16. if(build_userApp)
  17. list(APPEND module_list userApp)
  18. install(DIRECTORY userApp/include/ DESTINATION include)
  19. endif()
  20. if(build_TCPClient)
  21. list(APPEND module_list TCPClient)
  22. install(DIRECTORY TCPClient/include/ DESTINATION include)
  23. endif()
  24. if(build_HttpClient)
  25. list(APPEND module_list HttpClient)
  26. install(DIRECTORY HttpClient/include/ DESTINATION include)
  27. endif()
  28. if(build_recorder)
  29. list(APPEND module_list recorder)
  30. install(DIRECTORY recorder/include/ DESTINATION include)
  31. endif()
  32. if(build_Cleaner)
  33. list(APPEND module_list Cleaner)
  34. install(DIRECTORY Cleaner/include/ DESTINATION include)
  35. endif()
  36. if(build_monitor)
  37. list(APPEND module_list monitor)
  38. install(DIRECTORY monitor/include/ DESTINATION include)
  39. endif()
  40. if(build_deviceState)
  41. list(APPEND module_list deviceState)
  42. install(DIRECTORY deviceState/include/ DESTINATION include)
  43. endif()
  44. if(build_Manager)
  45. list(APPEND module_list Manager)
  46. install(DIRECTORY Manager/include/ DESTINATION include)
  47. endif()
  48. if(build_Shell)
  49. list(APPEND module_list Shell)
  50. install(DIRECTORY Shell/include/ DESTINATION include)
  51. endif()
  52. if(HAVE_FFMPEG)
  53. include_directories(${FFMPEG_INCLUDE_DIR})
  54. endif()
  55. if(HAVE_OPENCV)
  56. include_directories(${OpenCV_INCLUDE_DIRS})
  57. endif()
  58. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
  59. include_directories(${PROJECT_SOURCE_DIR}/modules)
  60. include_directories(${ToolKit_Root})
  61. include_directories(${MediaKit_Root})
  62. include_directories(/usr/local/cuda-10.2/include/)
  63. include_directories(${PROJECT_SOURCE_DIR}/framework/request/include/)
  64. foreach(module ${module_list})
  65. include_directories(${PROJECT_SOURCE_DIR}/modules/${module}/include/)
  66. file(GLOB_RECURSE module_src ${PROJECT_SOURCE_DIR}/modules/${module}/*.cpp)
  67. list(APPEND srcs ${module_src})
  68. endforeach()
  69. add_library(modules SHARED ${srcs})
  70. target_link_libraries(modules ${ALL_LINKER_LIBS})