Skip to content

Latest commit

 

History

History
41 lines (39 loc) · 879 Bytes

README.md

File metadata and controls

41 lines (39 loc) · 879 Bytes

CString

A simple dynamic String library for C

Version: 0.6

Building

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