Skip to content

Commit 41407fb

Browse files
committed
[install] Add missing JSON schemas in install script
1 parent f1e9073 commit 41407fb

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,16 @@ include(GNUInstallDirs)
104104

105105
file(GLOB_RECURSE PUBLIC_HEADERS
106106
LIST_DIRECTORIES false RELATIVE ${CMAKE_SOURCE_DIR} "${CMAKE_SOURCE_DIR}/src/*.h")
107+
file(GLOB OCPP_SCHEMAS
108+
LIST_DIRECTORIES false RELATIVE ${CMAKE_SOURCE_DIR} "${CMAKE_SOURCE_DIR}/schemas/*.json")
107109

108110
install(TARGETS open-ocpp-dynamic ${OPEN_OCPP_STATIC_TARGET}
109111
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
110112
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
111113
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
112114
)
113115
install(FILES ${PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openocpp)
116+
install(FILES ${OCPP_SCHEMAS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/openocpp/schemas)
114117

115118
file(GLOB RAPIDJSON_HEADERS
116119
LIST_DIRECTORIES false RELATIVE ${CMAKE_SOURCE_DIR} "${CMAKE_SOURCE_DIR}/3rdparty/rapidjson/include/rapidjson/*.h")

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,15 @@ The build generates 2 flavors of the **Open OCPP** library depending on the need
338338

339339
```cmake --install [build_dir] --strip```
340340

341-
The makefile contains helper targets which can be called if the installation needs to be done in a non standard directory using the variable INSTALL_PREFIX :
341+
The makefile contains helper targets which can be called if the installation needs to be done in a non standard directory using the variable *INSTALL_PREFIX* :
342342

343343
```make install-gcc-native INSTALL_PREFIX=/your/directory``` or ```make install-clang-native INSTALL_PREFIX=/your/directory```
344344

345-
If run without the INSTALL_PREFIX variable, it will install in the standard system directories.
345+
If run without the *INSTALL_PREFIX* variable, it will install in the standard system directories.
346346

347-
**Note**: If INSTALL_PREFIX is used, it must also be defined when building the project with the makefile helper targets.
347+
**Note**: If *INSTALL_PREFIX* is used, it must also be defined when building the project with the makefile helper targets.
348+
349+
**Open OCPP** needs the JSON schemas of the OCPP messages during execution. The schemas are installed in the : *INSTALL_DIR*/include/openocpp/schemas directory where *INSTALL_DIR* can be either the standard system directories or the custom directory specified by *INSTALL_PREFIX*.
348350

349351
### Use with CMake
350352

0 commit comments

Comments
 (0)