mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-07-29 20:17:37 +02:00
Add Jamfile, make CMake scripts Boost compliant
Summary: related to T15996 Reviewers: ivica, korina Reviewed By: ivica Subscribers: iljazovic, miljen Differential Revision: https://repo.mireo.local/D33480
This commit is contained in:
@ -1,16 +1,17 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
#
|
||||
# Copyright (c) 2025 Ivica Siladic, Bruno Iljazovic, Korina Simicevic
|
||||
#
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
|
||||
project(async-mqtt5-examples CXX)
|
||||
cmake_minimum_required(VERSION 3.8...3.20)
|
||||
|
||||
include(../cmake/project-is-top-level.cmake)
|
||||
|
||||
if(PROJECT_IS_TOP_LEVEL)
|
||||
find_package(async-mqtt5 REQUIRED)
|
||||
endif()
|
||||
project(async-mqtt5-examples LANGUAGES CXX)
|
||||
|
||||
function(add_example name)
|
||||
add_executable("${name}" ${ARGN})
|
||||
target_link_libraries("${name}" PRIVATE Async::MQTT5)
|
||||
target_link_libraries("${name}" PRIVATE Boost::mqtt5)
|
||||
string(FIND "${example_name}" "tls" found_tls)
|
||||
if(found_tls GREATER -1)
|
||||
target_link_libraries("${name}" PRIVATE OpenSSL::SSL)
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <boost/asio/strand.hpp>
|
||||
#include <boost/asio/thread_pool.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <boost/asio/strand.hpp>
|
||||
#include <boost/asio/thread_pool.hpp>
|
||||
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
|
Reference in New Issue
Block a user