Switch to building a dynamic lib by default. Tweak language in the README.md slightly. Inspired by PR#452.

This commit is contained in:
Eric Haszlakiewicz
2018-12-11 20:59:08 -05:00
parent ee4691c9fb
commit 6460446aa6
2 changed files with 10 additions and 7 deletions

View File

@@ -31,6 +31,8 @@ include(CPack)
include(GNUInstallDirs) include(GNUInstallDirs)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
option(BUILD_SHARED_LIBS "Default to building shared libraries" ON)
# Enable or disable features. By default, all features are turned off. # Enable or disable features. By default, all features are turned off.
option(ENABLE_RDRAND "Enable RDRAND Hardware RNG Hash Seed" OFF) option(ENABLE_RDRAND "Enable RDRAND Hardware RNG Hash Seed" OFF)
option(ENABLE_THREADING "Enable partial threading support." OFF) option(ENABLE_THREADING "Enable partial threading support." OFF)

View File

@@ -86,7 +86,7 @@ Then start from the "git clone" command, above.
### Manually install and build autoconf, automake and libtool ### Manually install and build autoconf, automake and libtool
For older OS's that don't have up-to-date version of the packages will For older OS's that don't have up-to-date versions of the packages will
require a bit more work. For example, CentOS release 5.11, etc... require a bit more work. For example, CentOS release 5.11, etc...
```sh ```sh
@@ -149,16 +149,17 @@ make
CMake can take a few options. CMake can take a few options.
Variable | Type | Description Variable | Type | Description
------------------|------|-------------- ---------------------|--------|--------------
BUILD_SHARED_LIBS | Bool | The default build generates static library. Enable this to generate shared (dll/so) library. CMAKE_INSTALL_PREFIX | String | The install location.
ENABLE_RDRAND | Bool | Enable RDRAND Hardware RNG Hash Seed BUILD_SHARED_LIBS | Bool | The default build generates a dynamic (dll/so) library. Set this to OFF to create a static library instead.
ENABLE_THREADING | Bool | Enable partial threading support ENABLE_RDRAND | Bool | Enable RDRAND Hardware RNG Hash Seed
ENABLE_THREADING | Bool | Enable partial threading support
Pass these options as `-D` on CMake's command-line. Pass these options as `-D` on CMake's command-line.
```sh ```sh
cmake -DBUILD_SHARED_LIBS=On ... cmake -DBUILD_SHARED_LIBS=OFF ...
``` ```
Linking to `libjson-c` <a name="linking"> Linking to `libjson-c` <a name="linking">