Home - smacklib/dev_smack_cpp GitHub Wiki
Compiler requirements
- If
gcc
is used withsmack::cpp
make sure that the version ofgcc
is at least 11.1.0. Version 9.3.0 does not supportstd::from_char
for floating point types, a feature thatsmack::cpp
uses (See...). Installation of gcc 11 on Ubuntu.
Consuming smack_cpp in your CMake project
Use CMake version 3.11 or better and add the following to your CMake project description:
include(FetchContent)
FetchContent_Declare(
smack_cpp
GIT_REPOSITORY https://github.com/smacklib/dev_smack_cpp.git
GIT_TAG v17.x
)
FetchContent_MakeAvailable(smack_cpp)
This dynamically downloads the version defined by GIT_TAG
of smack_cpp from GitHub. The value for GIT_TAG
is normally the latest release available from GitHub, the release page documents the necessary version tag.
After the call to FetchContent_MakeAvailable
, the CMake targets defined by smack_cpp will be available to the rest of the build. This can be used in link dependencies like shown below:
target_link_libraries(yourTarget
smack_cpp
)