diff --git a/CMakeLists.txt b/CMakeLists.txt index 56c3e23..7a4a2d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,10 @@ option(LSQPACK_XXH "Include XXH" ON) # Use `cmake -DBUILD_SHARED_LIBS=OFF` to build a static library. add_library(ls-qpack "") -target_include_directories(ls-qpack PUBLIC .) +target_include_directories(ls-qpack PUBLIC + $ + $ +) target_sources(ls-qpack PRIVATE lsqpack.c) if(LSQPACK_XXH) @@ -30,7 +33,10 @@ else() endif() if(WIN32) - target_include_directories(ls-qpack PUBLIC wincompat) + target_include_directories(ls-qpack PUBLIC + $ + $ + ) endif() if(MSVC) @@ -106,7 +112,16 @@ if(LSQPACK_BIN) add_subdirectory(bin) endif() -install(TARGETS ls-qpack) +install(TARGETS ls-qpack EXPORT unofficial-ls-qpack-config + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib +) +install( + EXPORT unofficial-ls-qpack-config + NAMESPACE unofficial::ls-qpack:: + DESTINATION share/unofficial-ls-qpack +) install(FILES lsqpack.h lsxpack_header.h DESTINATION include) if(WIN32) install(DIRECTORY wincompat/sys DESTINATION include)