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
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:
4
5
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.
9
11
10
12
## OSX / UNIX Installation
11
13
12
-
so full commandline 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:
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.
23
25
24
26
## Windows Installation Clang
25
27
26
-
``
28
+
On Windows the install commands may look like:
29
+
30
+
```
27
31
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 ..
28
32
cmake --build . --config Release
29
-
``
30
-
31
-
Need to be in a console running as administrator.
32
-
33
-
``
34
33
cmake --install .
35
-
``
34
+
```
36
35
37
-
## Minimal example CMAKE
36
+
(Probably need to be in a console running as administrator)
38
37
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
40
39
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
42
41
43
-
APR::staticLib (Note, tested across Windows, Linux, and Mac)
44
-
APR::sharedLib (Note, not tested)
42
+
### Notes:
45
43
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).
47
45
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.
49
48
49
+
If APR is installed in a non-standard location then some hint for cmake must be provided by adding the install directory
0 commit comments