# 设置工程名
set(target_name receive_data)

# 添加文件
set(RslidarFile
        rslidar/rslidar_config.hpp
        rslidar/rslidar_driver.cpp
        rslidar/rslidar_driver.h
        rslidar/rslidar_manager.cpp
        rslidar/rslidar_manager.h
        rslidar/rslidar_mqtt_async.cpp
        rslidar/rslidar_mqtt_async.h
)

# 生成可执行程序
add_executable(${target_name}
        ${RslidarFile}
        lidar_manager.h
        lidar_manager.cpp
        main.cpp
        )

# 添加链接静态库
target_link_libraries(${target_name}
        zx
        ${rs_driver_LIBRARIES}
        -lpthread
        )

# 安装
install(TARGETS ${target_name}
        LIBRARY DESTINATION lib  # 动态库安装路径
        ARCHIVE DESTINATION lib  # 静态库安装路径
        RUNTIME DESTINATION bin  # 可执行文件安装路径
        PUBLIC_HEADER DESTINATION include  # 头文件安装路径
        )

#install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/etc
#        DESTINATION ${CMAKE_INSTALL_PREFIX}
#        )

