IlyaGrebnov / libsais

libsais is a library for linear time suffix array, longest common prefix array and burrows wheeler transform construction based on induced sorting algorithm.
Apache License 2.0
180 stars 22 forks source link

Add CMake script for library build and install #11

Closed leha-bot closed 1 year ago

leha-bot commented 2 years ago

The install logic also allows seamlessly use the library in any another project via

find_package(sais REQUIRED)
...
target_link_libraries(mytarget sais::sais)

The user should use the #include <libsais/libsais.h> include path. This path will be transitively added via target_link_libraries().

The test_package dir contains the simplest project which tries to link library using the find_package().