Skip to content

Commit a65bed9

Browse files
authored
Add cmake code to automatically generate certificates if requested (#23)
Signed-off-by: Kai-Uwe Hermann <kai-uwe.hermann@pionix.de>
1 parent 646ceca commit a65bed9

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,16 @@ add_custom_target(iso15118_requirements_pip_install_dist
4242
COMMENT
4343
"Installing iso15118 requirements from distribution"
4444
)
45+
46+
if (ISO15118_2_GENERATE_AND_INSTALL_CERTIFICATES)
47+
message(STATUS "Generating ISO15118 certificates for ${PROJECT_SOURCE_DIR}")
48+
set(CREATE_CERTS_WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/iso15118/shared/pki")
49+
set(CREATE_CERTS_SCRIPT "${CREATE_CERTS_WORKING_DIRECTORY}/create_certs.sh")
50+
51+
execute_process(
52+
COMMAND
53+
${CREATE_CERTS_SCRIPT} -v iso-2 -i ${PROJECT_SOURCE_DIR}
54+
WORKING_DIRECTORY
55+
${CREATE_CERTS_WORKING_DIRECTORY}
56+
)
57+
endif()

0 commit comments

Comments
 (0)