find_package(OpenSSL REQUIRED)
find_package(OpenCV REQUIRED)
find_package(LibDataChannel REQUIRED)
find_package(Boost COMPONENTS json REQUIRED)

add_executable(PassengerStatistics main.cpp
    Application.h Application.cpp
    Camera.h Camera.cpp
    ImageUtilities.h ImageUtilities.cpp
    NngServer.h NngServer.cpp
    RtspServer.h RtspServer.cpp
    RwAlgorithm.h RwAlgorithm.cpp
    Settings.h Settings.cpp
    VideoInput.h VideoInput.cpp

    HttpServer/HttpSession.h HttpServer/HttpSession.cpp
    HttpServer/ResponseUtility.h HttpServer/ResponseUtility.cpp
    HttpServer/ServiceLogic.h HttpServer/ServiceLogic.cpp

    WebRTC/Streamer.h WebRTC/Streamer.cpp
    WebRTC/Helpers.h WebRTC/Helpers.cpp
    WebRTC/SignalServer.h WebRTC/SignalServer.cpp
    WebRTC/WebSocketSignalSession.h  WebRTC/WebSocketSignalSession.cpp
)

target_include_directories(PassengerStatistics
    PRIVATE ${CMAKE_SOURCE_DIR}/3rdparty/rw_mpp/include
    PRIVATE ${CMAKE_SOURCE_DIR}/3rdparty/fsan_sensorsdk/include
    PRIVATE ${CMAKE_SOURCE_DIR}/3rdparty/libsetscene/include
    PRIVATE ${CMAKE_SOURCE_DIR}/3rdparty/ds_pedestrian_mot_hisi/include
    PRIVATE ${ZLMediaKit_INCLUDE_DIR}
    PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
)

target_link_directories(PassengerStatistics
    PRIVATE ${CMAKE_SOURCE_DIR}/3rdparty/rw_mpp/lib
    PRIVATE ${CMAKE_SOURCE_DIR}/3rdparty/fsan_sensorsdk/libs
    PRIVATE ${CMAKE_SOURCE_DIR}/3rdparty/libsetscene/lib
    PRIVATE ${CMAKE_SOURCE_DIR}/3rdparty/ds_pedestrian_mot_hisi/libs
    PRIVATE ${ZLMediaKit_LIBRARY_DIRS}
    PRIVATE ${OPENSSL_LIBRARY_DIRS}
)

target_link_libraries(PassengerStatistics
    PRIVATE Kylin::Core
    PRIVATE Kylin::Router
    PRIVATE Kylin::Nng
    PRIVATE LibDataChannel::LibDataChannel
    PRIVATE OpenSSL::SSL 
    PRIVATE OpenSSL::Crypto
    PRIVATE Boost::json
    PRIVATE rw_mpp
    PRIVATE sensorsdk
    PRIVATE setscene
    PRIVATE ds_pedestrian_mot_Hi3516DV500
    PRIVATE mk_api
    PRIVATE opencv_world
    PRIVATE ${SCTP_LIBRARIES}
)