Skip to content

Commit 6defe4e

Browse files
committed
Add support for shortening include paths
1 parent 65692ff commit 6defe4e

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

examples/unix/cmake/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ add_subdirectory ("../../.." "cryptolens-cpp")
3030
# install(DIRECTORY ${cryptolens_SOURCE_DIR}/include/ DESTINATION include)
3131
# install(DIRECTORY ${cryptolens_SOURCE_DIR}/third_party/ DESTINATION third_party)
3232
# install(TARGETS cryptolens DESTINATION lib)
33+
#
34+
# Uncomment the following lines in order to shorten include paths
35+
#
36+
# target_include_directories(cryptolens PRIVATE "${cryptolens_SOURCE_DIR}/third_party/ArduinoJson5")
37+
# target_include_directories(cryptolens PRIVATE "${cryptolens_SOURCE_DIR}/third_party/optional-lite")
38+
# target_compile_definitions(cryptolens PRIVATE CRYPTOLENS_SHORT_INCLUDE_PATHS)
3339

3440
add_executable(example_activate ../example_activate.cpp)
3541
target_link_libraries(example_activate cryptolens)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1+
#ifdef CRYPTOLENS_SHORT_INCLUDE_PATHS
2+
13
#include <ArduinoJson.hpp>
4+
5+
#else
6+
7+
#include <ArduinoJson.hpp>
8+
9+
#endif

include/cryptolens/imports/std/optional

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
#pragma once
22

3+
#ifdef CRYPTOLENS_SHORT_INCLUDE_PATHS
4+
35
#include <optional>
46

7+
#else
8+
9+
#include <optional>
10+
11+
#endif
12+
513
namespace cryptolens_io {
614

715
namespace v20190401 {

0 commit comments

Comments
 (0)