Skip to content

Commit

Permalink
Make it possible to use own logger instead of everest logger (#3)
Browse files Browse the repository at this point in the history
* Make it possible to use own logger instead of everest logger
* Update liblog version to 0.2.0

---------

Signed-off-by: Maaike Zijderveld, Alfen <[email protected]>
Signed-off-by: Kai-Uwe Hermann <[email protected]>
Co-authored-by: Kai-Uwe Hermann <[email protected]>
  • Loading branch information
maaikez and hikinggrass authored Sep 29, 2023
1 parent c4bae7b commit 089843f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
liblog:
git: https://github.com/EVerest/liblog.git
git_tag: v0.1.0
git_tag: v0.2.0
options: ["BUILD_EXAMPLES OFF"]

gtest:
Expand Down
30 changes: 28 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,35 @@ target_include_directories(evse_security
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)

target_link_libraries(evse_security
PUBLIC
#############
# Logging configuration
#############
if (EVEREST_CUSTOM_LOGGING_INCLUDE_PATH)
if (NOT EXISTS "${EVEREST_CUSTOM_LOGGING_INCLUDE_PATH}/everest/logging.hpp")
message(FATAL_ERROR "everest/logging.hpp not found in directory ${EVEREST_CUSTOM_LOGGING_INCLUDE_PATH}")
else()
target_include_directories(evse_security
PUBLIC
include
${EVEREST_CUSTOM_LOGGING_INCLUDE_PATH}
)
endif()
message(STATUS "Using the following logging header: ${EVEREST_CUSTOM_LOGGING_INCLUDE_PATH}/everest/logging.hpp")
endif()

if (NOT EVEREST_CUSTOM_LOGGING_INCLUDE_PATH)
target_link_libraries(evse_security
PUBLIC
everest::log
)
message(STATUS "Using the default logging header")
endif()

#############
# End logging configuration
#############

target_link_libraries(evse_security
PRIVATE
OpenSSL::SSL
OpenSSL::Crypto
Expand Down

0 comments on commit 089843f

Please sign in to comment.