Skip to content
This repository was archived by the owner on Sep 27, 2024. It is now read-only.

Commit 973edc7

Browse files
committed
Improve build documentation when building against locally built OpenSCAP library.
Add sections to describe on how to set required linker environment variables.
1 parent d36c4d9 commit 973edc7

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,20 @@ optional dependencies:
3535
2) Build SCAP Workbench:
3636
```console
3737
$ mkdir build; cd build
38-
$ # This export line is only required if openscap was compiled locally;
39-
$ # add to PKG_CONFIG_PATH the directory containing installed libopenscap.pc
40-
$ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/PATH/TO/DIR/WITH/.pcFILE/"
4138
$ cmake ../
4239
$ make
4340
```
41+
To build against locally built OpenSCAP library export following variables:
42+
43+
```console
44+
$ export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/PATH/TO/DIR/WITH/.pcFILE/"
45+
$ export LIBRARY_PATH=/PATH/TO/DIR/WITH/openscap.soFILE/
46+
```
4447

45-
If you have built openscap locally it is possible to use it through custom CMake definitions:
48+
Additionally it is possible to use custom CMake definitions instead of exporting environment variables:
4649

4750
```console
48-
$ cmake -DOPENSCAP_LIBRARIES:PATH=/local/openscap.so/filepath/ \
51+
$$ cmake -DOPENSCAP_LIBRARIES:PATH=/local/openscap.so/filepath/ \
4952
-DOPENSCAP_INCLUDE_DIRS:PATH=/local/openscap/include/path \
5053
-DOPENSCAP_VERSION:STRING="X.Y.Z" \
5154
../
@@ -56,6 +59,8 @@ $ make
5659

5760
(inside the build folder):
5861
```console
62+
$ # may require superuser privileges if you didn't set different installation
63+
$ # prefix (CMAKE_INSTALL_PREFIX)
5964
$ make install
6065
```
6166

@@ -83,6 +88,16 @@ $ cd build/
8388
$ bash runwrapper.sh ./scap-workbench
8489
```
8590

91+
If you have built SCAP-Workbench against locally built OpenSCAP library, then run one of the following commands:
92+
93+
```console
94+
$ ldconfig /PATH/TO/DIR/WITH/openscap.soFILE/
95+
```
96+
or
97+
```console
98+
$ export LD_LIBRARY_PATH=/PATH/TO/DIR/WITH/openscap.soFILE/
99+
```
100+
86101
What now?
87102
---------
88103

0 commit comments

Comments
 (0)