Perhaps something that the description in README or USAGE is currently lacking is a code example for discovering and using the library from a client project.
I have used the following snippet in my integration tests:
find_package(PkgConfig)
pkg_check_modules(PC_CIFTI REQUIRED CiftiLib)
add_library(PkgConfig::Cifti INTERFACE IMPORTED)
set_target_properties(PkgConfig::Cifti PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${PC_CIFTI_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${PC_CIFTI_LIBRARIES}"
INTERFACE_COMPILE_OPTIONS "${PC_CIFTI_CFLAGS_OTHER}")
[...]
add_executable(myexecutable myexecutable.cxx)
target_link_libraries(myexecutable PkgConfig::Cifti)
Feel free to copy or adapt this code if you wish.
Perhaps something that the description in
READMEorUSAGEis currently lacking is a code example for discovering and using the library from a client project.I have used the following snippet in my integration tests:
Feel free to copy or adapt this code if you wish.