From 8642954942347a40869ea05c4aa0507326855269 Mon Sep 17 00:00:00 2001 From: Henry Winkel Date: Sat, 22 Oct 2022 14:44:02 +0200 Subject: [PATCH] ADD: added libzmq and cppm AND added the libs to the CMakeLists.txt --- .gitignore | 1 + CMakeLists.txt | 15 +++++++++++++++ include/WHISPER/whisper.hpp | 12 ++++++++++++ src/WHISPER/whisper.cpp | 19 +++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 src/WHISPER/whisper.cpp diff --git a/.gitignore b/.gitignore index 378eac2..d835f77 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build +.cache \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index b0de671..ad0ef48 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,13 +13,28 @@ IF(NOT TARGET loguru) add_subdirectory(libs/loguru EXCLUDE_FROM_ALL) ENDIF() +IF(NOT TARGET libzmq) + set(ZMQ_BUILD_TESTS OFF CACHE INTERNAL "") + add_subdirectory(libs/libzmq) + +ENDIF() + +IF(NOT TARGET cppzmq) + set(CPPZMQ_BUILD_TESTS OFF CACHE INTERNAL "") + add_subdirectory(libs/cppzmq EXCLUDE_FROM_ALL) +ENDIF() + + add_library(whisper-com STATIC include/WHISPER/whisper.hpp + src/WHISPER/whisper.cpp ) target_link_libraries(whisper-com loguru + cppzmq + libzmq ) target_include_directories(whisper-com PUBLIC diff --git a/include/WHISPER/whisper.hpp b/include/WHISPER/whisper.hpp index 37f2aeb..6feba27 100644 --- a/include/WHISPER/whisper.hpp +++ b/include/WHISPER/whisper.hpp @@ -10,10 +10,22 @@ * @copyright 2022 MPLv2 */ +#define ZMQ_BUILD_DRAFT_API 1 +#include + /** * @brief namespace for all whisper-com related components */ namespace WHISPER { // Add datatypes here + class whispercomm{ + + + + + }; + + + } // namespace WHISPER \ No newline at end of file diff --git a/src/WHISPER/whisper.cpp b/src/WHISPER/whisper.cpp new file mode 100644 index 0000000..8d076ed --- /dev/null +++ b/src/WHISPER/whisper.cpp @@ -0,0 +1,19 @@ +/* +* This Source Code Form is subject to the terms of the Mozilla Public +* License, v. 2.0. If a copy of the MPL was not distributed with this +* file, You can obtain one at https://mozilla.org/MPL/2.0/. +*/ + +/** +* @file +* @copyright 2022 MPLv2 +*/ + +#include +/** + * @brief namespace for all whisper-com related components + */ +namespace WHISPER +{ + // Add datatypes here +} // namespace WHISPER \ No newline at end of file