A simple dynamic String library for C
Version: 0.6
- Create a build directory
mkdir build && cd build/
- Generate CMake build files
- Static library build
cmake ..
- Shared library build
cmake .. -DBUILD_SHARED_LIB=ON
- Run tests (optional)
- Do it inside the
build/
directory
ctest
- Using the library
- add as git submodule (other method are also possible, but this is recommended)
git submodule add https://github.com/rseragon/CString.git
- Add the sub-directory (in cmake file)
add_subdirectory(${PROJECT_SOURCE_DIR}/path/to/CString)
- Link the library
target_link_libraries(${PROJECT_NAME} PUBLIC CString)
- Include headers
target_include_directories(${PROJECT_NAME} PUBLIC ${CSTRING_LIB_HEADERS})