Skip to content

Commit

Permalink
Moved conversions of EVerest to/from libevse-security types to lib/st…
Browse files Browse the repository at this point in the history
…aging in order to be able to use it also within other modules (#686)

Signed-off-by: pietfried <[email protected]>
Co-authored-by: Kai Hermann <[email protected]>
  • Loading branch information
Pietfried and hikinggrass authored May 16, 2024
1 parent 2c28b84 commit dd4b38e
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/staging/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_subdirectory(can_dpm1000)
add_subdirectory(evse_security)
if(EVEREST_DEPENDENCY_ENABLED_LIBSLAC AND EVEREST_DEPENDENCY_ENABLED_LIBFSM)
add_subdirectory(slac)
endif()
Expand Down
21 changes: 21 additions & 0 deletions lib/staging/evse_security/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
add_library(evse_security_conversions STATIC)
add_library(everest::evse_security_conversions ALIAS evse_security_conversions)

target_sources(evse_security_conversions
PRIVATE
conversions.cpp
)

target_include_directories(evse_security_conversions
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
"$<TARGET_PROPERTY:generate_cpp_files,EVEREST_GENERATED_INCLUDE_DIR>"
)

add_dependencies(evse_security_conversions generate_cpp_files)

target_link_libraries(evse_security_conversions
PRIVATE
everest::evse_security
everest::framework
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <exception>

#include <conversions.hpp>
#include <evse_security/conversions.hpp>

namespace module {

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion modules/EvseSecurity/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ ev_setup_cpp_module()
target_link_libraries(${MODULE_NAME}
PRIVATE
everest::evse_security
everest::evse_security_conversions
)
# ev@bcc62523-e22b-41d7-ba2f-825b493a3c97:v1

target_sources(${MODULE_NAME}
PRIVATE
"main/evse_securityImpl.cpp"
"conversions.cpp"
)

# ev@c55432ab-152c-45a9-9d2e-7281d50c69c3:v1
Expand Down
2 changes: 1 addition & 1 deletion modules/EvseSecurity/main/evse_securityImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright Pionix GmbH and Contributors to EVerest

#include "evse_securityImpl.hpp"
#include "../conversions.hpp"
#include <evse_security/conversions.hpp>

namespace module {
namespace main {
Expand Down

0 comments on commit dd4b38e

Please sign in to comment.