123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/)
- include_directories(${3RDPARTY_INCLUDE_DIRS})
- # 添加编译参数
- add_compile_options(-Wall -std=c++11 -O2 -g -DPLATFORM_TEGRA)
- set(module_list "")
- if(build_inference)
- list(APPEND module_list inference)
- install(DIRECTORY inference/include/ DESTINATION include)
- endif()
- if(build_dataType)
- list(APPEND module_list dataType)
- install(DIRECTORY dataType/include/ DESTINATION include)
- endif()
- if(build_md5)
- list(APPEND module_list md5)
- install(DIRECTORY md5/include/ DESTINATION include)
- endif()
- if(build_userApp)
- list(APPEND module_list userApp)
- install(DIRECTORY userApp/include/ DESTINATION include)
- endif()
- if(build_HttpClient)
- list(APPEND module_list HttpClient)
- install(DIRECTORY HttpClient/include/ DESTINATION include)
- endif()
- if(build_recorder)
- list(APPEND module_list recorder)
- install(DIRECTORY recorder/include/ DESTINATION include)
- endif()
- if(build_Cleaner)
- list(APPEND module_list Cleaner)
- install(DIRECTORY Cleaner/include/ DESTINATION include)
- endif()
- if(build_monitor)
- list(APPEND module_list monitor)
- install(DIRECTORY monitor/include/ DESTINATION include)
- endif()
- if(build_deviceState)
- list(APPEND module_list deviceState)
- install(DIRECTORY deviceState/include/ DESTINATION include)
- endif()
- if(build_Manager)
- list(APPEND module_list Manager)
- install(DIRECTORY Manager/include/ DESTINATION include)
- endif()
- if(build_Shell)
- list(APPEND module_list Shell)
- install(DIRECTORY Shell/include/ DESTINATION include)
- endif()
- if(build_Disposition)
- list(APPEND module_list Disposition)
- install(DIRECTORY Disposition/include/ DESTINATION include)
- endif()
- if(build_InfineFilter)
- list(APPEND module_list InfineFilter)
- install(DIRECTORY InfineFilter/include/ DESTINATION include)
- endif()
- if(HAVE_FFMPEG)
- include_directories(${FFMPEG_INCLUDE_DIR})
- endif()
- if(HAVE_OPENCV)
- include_directories(${OpenCV_INCLUDE_DIRS})
- endif()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
- include_directories(${PROJECT_SOURCE_DIR}/modules)
- include_directories(${ToolKit_Root})
- include_directories(${MediaKit_Root})
- include_directories(/usr/local/cuda-10.2/include/)
- foreach(module ${module_list})
- include_directories(${PROJECT_SOURCE_DIR}/modules/${module}/include/)
- file(GLOB_RECURSE module_src ${PROJECT_SOURCE_DIR}/modules/${module}/*.cpp)
- list(APPEND srcs ${module_src})
- endforeach()
- add_library(modules SHARED ${srcs})
- target_link_libraries(modules ${ALL_LINKER_LIBS})
|