Skip to content

Commit

Permalink
Added support for UDPCAP_LIBRARY_TYPE to control the library type wit…
Browse files Browse the repository at this point in the history
…hout setting BUILD_SHARED_LIBS (#12)
  • Loading branch information
FlorianReimold authored Feb 26, 2024
1 parent d30fe4c commit 25b05eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ You can set the following CMake Options to control how Udpcap is supposed to bui
| `UDPCAP_THIRDPARTY_USE_BUILTIN_PCAPPLUSPLUS` | `BOOL` | `ON` | Fetch and build against an integrated Version of Pcap++. <br>_Only available if `UDPCAP_THIRDPARTY_ENABLED=ON`_ |
| `UDPCAP_THIRDPARTY_USE_BUILTIN_ASIO` | `BOOL` | `ON` | Fetch and build against an integrated Version of asio. <br>Only available if `UDPCAP_THIRDPARTY_ENABLED=ON` |
| `UDPCAP_THIRDPARTY_USE_BUILTIN_GTEST` | `BOOL` | `ON` | Fetch and build tests against a predefined version of GTest. If disabled, the targets have to be provided externally. <br>Only available if `UDPCAP_THIRDPARTY_ENABLED=ON` and `UDPCAP_BUILD_TESTS=ON`|
| `BUILD_SHARED_LIBS` | `BOOL` | | Not a udpcap option, but use this to control whether you want to have a static or shared library |
| `UDPCAP_LIBRARY_TYPE` | `STRING` | | Controls the library type of Udpcap by injecting the string into the `add_library` call. Can be set to STATIC / SHARED / OBJECT. If set, this will override the regular `BUILD_SHARED_LIBS` CMake option. If not set, CMake will use the default setting, which is controlled by `BUILD_SHARED_LIBS`. |
# How to integrate Udpcap in your project

**Integrate as binaries**:
Expand Down
2 changes: 1 addition & 1 deletion udpcap/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ set(sources
src/udpcap_socket_private.h
)

add_library (${PROJECT_NAME}
add_library (${PROJECT_NAME} ${UDPCAP_LIBRARY_TYPE}
${includes}
${sources}
)
Expand Down

0 comments on commit 25b05eb

Please sign in to comment.