项目结构
CMakeLists.txt
cmake_minimum_required(VERSION 3.7)SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")project(CapPictureTest)include_directories(include)link_directories(${CMAKE_SOURCE_DIR}/lib ${CMAKE_SOURCE_DIR}/lib/HCNetSDKCom) add_executable(CapAlarmTest Main.cpp src/Alarm.cpp src/Common.cpp)target_link_libraries(CapAlarmTest hcnetsdk)
效果
Demo下载