The package zstr is header only and can be used from CMake via: find_path(ZSTR_INCLUDE_DIRS "zstr.hpp") target_include_directories(main PRIVATE ${ZSTR_INCLUDE_DIRS})