You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-12Lines changed: 33 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,8 @@ This implementation is based on the following libraries :
31
31
-[Build](#build)
32
32
-[Pre-requisites](#pre-requisites)
33
33
-[Build options](#build-options)
34
+
-[Linux build](#linux-build)
35
+
-[Windows build](#windows-build)
34
36
-[Install and use](#install-and-use)
35
37
-[Installation](#installation)
36
38
-[Use with CMake](#use-with-cmake)
@@ -327,9 +329,8 @@ The behavior and the configuration of the **Open OCPP** stack can be modified th
327
329
328
330
* A fully C++17 compliant compiler
329
331
* OpenSSL library v1.1.1 or greater
330
-
* SQLite 3 library
331
332
* CMake 3.13 or greater
332
-
* Make 4.1 or greater
333
+
* Make 4.1 or greater (for Linux build only)
333
334
* curl 7.70 or greater (for examples only, to allow diagnotics uploads)
334
335
* zip 3.0 or greater (for examples only, to allow diagnotics uploads)
335
336
@@ -338,37 +339,57 @@ For information, most of the development has been made on the following environm
338
339
* Debian 11 (Bullseye)
339
340
* gcc 10.2 and clang 11.0
340
341
* OpenSSL 1.1.1k
341
-
* SQLite 3.34.1
342
342
* CMake 3.18
343
343
* Make 4.3
344
344
345
345
### Build options
346
346
347
347
The build is based on CMake, the following definitions must be passed to the CMake command to customize the build :
348
348
349
-
***TARGET** : Allow to load the appropriate *CMakeLists_TARGET.txt* file
349
+
***TARGET** : Allow to load the appropriate *CMakeLists_TARGET.txt* file => not needed for native GCC/CLang or MSVC since it will be automatically detected
350
350
***BIN_DIR** : Output directory for the generated binaries
351
351
***CMAKE_BUILD_TYPE** : Can be set to either Debug or Release (Release build produces optimized stripped binaries)
352
352
353
353
Additionnaly, the **CMakeLists_Options.txt** contains several options that can be switched on/off.
354
354
355
+
The build generates 2 flavors of the **Open OCPP** library depending on the needs of your project :
356
+
* Shared : libopen-ocpp.so
357
+
* Static : libopen-ocpp_static.a
358
+
359
+
**Note**: When using **Open OCPP** in a non GNU LGPL project, the shared library must be used in order to not contaminate your project with the LGPL licence (see [Wikipedia GNU LGPL article](https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License#Differences_from_the_GPL))
360
+
361
+
### Linux build
362
+
355
363
An helper makefile is available at project's level to simplify the use of CMake. Just use the one of the following commands to build using gcc or gcc without cross compilation :
356
364
357
-
```make gcc-native``` or ```make clang-native``` or ```make gcc-native BUILD_TYPE=Debug``` or ```make clang-native BUILD_TYPE=Debug```
365
+
```make gcc``` or ```make clang``` or ```make gcc BUILD_TYPE=Debug``` or ```make clang BUILD_TYPE=Debug```
358
366
359
367
This makefile also contains the corresponding cleaning targets :
360
368
361
-
```make clean-gcc-native``` or ```make clean-clang-native```
369
+
```make clean-gcc``` or ```make clean-clang```
362
370
363
371
And to run the unit tests :
364
372
365
-
```make tests-gcc-native``` or ```make tests-clang-native```
373
+
```make tests-gcc``` or ```make tests-clang```
366
374
367
-
The build generates 2 flavors of the **Open OCPP** library depending on the needs of your project :
368
-
* Shared : libopen-ocpp.so
369
-
* Static : libopen-ocpp_static.a
375
+
### Windows build
370
376
371
-
**Note**: When using **Open OCPP** in a non GNU LGPL project, the shared library must be used in order to not contaminate your project with the LGPL licence (see [Wikipedia GNU LGPL article](https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License#Differences_from_the_GPL))
377
+
**Open OCPP** can be generated on Window plateform using Visual Studio 2022 Community Edition. To open and build the project please follow the standard instructions from Microsoft to [build a CMake based project in Visual Studio](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170).
378
+
379
+
You will have to install first a full Windows package of the OpenSSL library (including headers). One can be found on this website : https://slproweb.com/products/Win32OpenSSL.html (do not download the "Light" versions which are not embedding the headers).
380
+
381
+
Then the following environment variables must be defined to allow Visual Studio/CMake to find the installed OpenSSL package :
382
+
383
+
* OPENSSL_INCLUDE_DIR
384
+
* OPENSSL_ROOT_DIR
385
+
386
+
Example for a 64-bit OpenSSL package download from the mentioned website and installed in the default folder :
**Note** : Do not forget to close and re-open Visual Studio after having modified the environment variables to have them taken into account
372
393
373
394
## Install and use
374
395
### Installation
@@ -379,7 +400,7 @@ The build generates 2 flavors of the **Open OCPP** library depending on the need
379
400
380
401
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* :
381
402
382
-
```make install-gcc-native INSTALL_PREFIX=/your/directory``` or ```make install-clang-native INSTALL_PREFIX=/your/directory```
403
+
```make install-gcc INSTALL_PREFIX=/your/directory``` or ```make install-clang INSTALL_PREFIX=/your/directory```
383
404
384
405
If run without the *INSTALL_PREFIX* variable, it will install in the standard system directories.
0 commit comments