Skip to content

Commit 5e1220f

Browse files
committed
update install instructions
1 parent afd8cdb commit 5e1220f

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

INSTALL_INSTRUCTIONS.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# Install instructions for LibAPR.
22

3-
The way to use it is configure it via some new APR_* variables (can be set to ON/OFF depending on needs) which describes what to build and if it should be installed through cmake commands:
3+
The build is configured it via several CMake options (APR_* variables), which can be set to ON/OFF depending on your needs.
4+
The following options control the build type and installation:
45

5-
APR_BUILD_STATIC_LIB=ON
6-
APR_BUILD_SHARED_LIB=OFF
7-
APR_INSTALL=ON
8-
(all other configuration possibilities are now in the top of CMakeLists.txt file)
6+
- APR_BUILD_STATIC_LIB=ON
7+
- APR_BUILD_SHARED_LIB=OFF
8+
- APR_INSTALL=ON
9+
10+
See [README](README.md) for the full list of build options.
911

1012
## OSX / UNIX Installation
1113

12-
so full command line would look like: (-DCMAKE_INSTALL_PREFIX=/tmp/APR can be used for a non-default location)
14+
The full command-line to install the library may look like:
1315

1416
```
1517
mkdir build
@@ -18,35 +20,34 @@ cmake -DAPR_INSTALL=ON -DAPR_BUILD_STATIC_LIB=ON -DAPR_BUILD_SHARED_LIB=OFF ..
1820
make
1921
make install
2022
```
21-
22-
You may need file-permissions (sudo for the install)
23+
with other build options turned on/off as required. Non-default install locations can be set via
24+
`-DCMAKE_INSTALL_PREFIX=/tmp/APR`. Depending on the location, you may need file-permissions (sudo) for the install command.
2325

2426
## Windows Installation Clang
2527

26-
``
28+
On Windows the install commands may look like:
29+
30+
```
2731
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_TOOLCHAIN_FILE="PATH_TO_VCPKG\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -T ClangCL -DAPR_BUILD_STATIC_LIB=ON -DAPR_BUILD_SHARED_LIB=OFF -DAPR_INSTALL=ON ..
2832
cmake --build . --config Release
29-
``
30-
31-
Need to be in a console running as administrator.
32-
33-
``
3433
cmake --install .
35-
``
34+
```
3635

37-
## Minimal example CMAKE
36+
(Probably need to be in a console running as administrator)
3837

39-
To use APR the minimalistic CMakeLists.txt file can be found here: https://github.com/AdaptiveParticles/APR_cpp_project_example
38+
## Minimal CMake example
4039

41-
##
40+
A minimalistic CMakeLists.txt file for using LibAPR in another C++ project can be found here: https://github.com/AdaptiveParticles/APR_cpp_project_example
4241

43-
APR::staticLib (Note, tested across Windows, Linux, and Mac)
44-
APR::sharedLib (Note, not tested)
42+
### Notes:
4543

46-
If shared version is preferred then APR::sharedLib should be used (and of course APR_BUILD_SHARED_LIB=ON during lib build step).
44+
If shared version is preferred then `APR::sharedLib` should be used (and of course APR_BUILD_SHARED_LIB=ON during the build step).
4745

48-
NOTICE: if APR is installed in not standard directory then some hint for cmake must be provided by adding install dir to CMAKE_PREFIX_PATH like for above example:
46+
Use of `APR::staticLib` has been tested across Windows, Linux, and Mac.
47+
`APR::sharedLib` has currently only been tested on Linux.
4948

49+
If APR is installed in a non-standard location then some hint for cmake must be provided by adding the install directory
50+
to CMAKE_PREFIX_PATH, for example:
5051
```
5152
export CMAKE_PREFIX_PATH=/tmp/APR:$CMAKE_PREFIX_PATH
5253
```

0 commit comments

Comments
 (0)