diff --git a/dependencies/CMakeLists.txt b/dependencies/CMakeLists.txt index 0b59454..0e31e8f 100644 --- a/dependencies/CMakeLists.txt +++ b/dependencies/CMakeLists.txt @@ -77,5 +77,6 @@ find_package(Gettext REQUIRED) add_subdirectory(catch2) +add_subdirectory(leaf) add_subdirectory(nlohmann_json) add_subdirectory(whereami) diff --git a/dependencies/leaf/CMakeLists.txt b/dependencies/leaf/CMakeLists.txt new file mode 100644 index 0000000..0629b7c --- /dev/null +++ b/dependencies/leaf/CMakeLists.txt @@ -0,0 +1,20 @@ +############################################################################### +# License: BSD Zero Clause License file +# Copyright: +# (C) 2022 Alexander Shaduri +############################################################################### + +add_library(boost_leaf INTERFACE) + +# Relative sources are allowed only since cmake 3.13. +target_sources(boost_leaf INTERFACE + ${CMAKE_CURRENT_SOURCE_DIR}/standalone/leaf.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/convenience/leaf_ns.h +) + +target_include_directories(boost_leaf + INTERFACE SYSTEM + "${CMAKE_SOURCE_DIR}/dependencies/leaf/standalone" + "${CMAKE_SOURCE_DIR}/dependencies/leaf/convenience" +) + diff --git a/dependencies/leaf/convenience/leaf_ns.h b/dependencies/leaf/convenience/leaf_ns.h new file mode 100644 index 0000000..8f5fd88 --- /dev/null +++ b/dependencies/leaf/convenience/leaf_ns.h @@ -0,0 +1,22 @@ +/****************************************************************************** +License: GNU General Public License v3.0 only +Copyright: + (C) 2022 Alexander Shaduri +******************************************************************************/ +#ifndef APP_LEAF_NS_H +#define APP_LEAF_NS_H + +#include "../standalone/leaf.hpp" + + +/// Use leaf:: instead of boost::leaf for convenience +namespace leaf { + + using namespace boost::leaf; + +} + + +#endif + +/// @}