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

add_executable(PassengerStatistics main.cpp
    Camera.h Camera.cpp
    ImageUtilities.h ImageUtilities.cpp
    RtspServer.h RtspServer.cpp
    VideoInput.h VideoInput.cpp

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

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

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

target_link_libraries(PassengerStatistics
    PRIVATE Kylin::Core
    PRIVATE LibDataChannel::LibDataChannel
    PRIVATE OpenSSL::SSL 
    PRIVATE OpenSSL::Crypto
    PRIVATE Boost::json
    PRIVATE rw_mpp
    PRIVATE sensorsdk
    PRIVATE mk_api
    PRIVATE ${OpenCV_LIBS}
    PRIVATE ${SCTP_LIBRARIES}
)