Skip to content

Commit ea8234e

Browse files
committed
modify docs
1 parent 3631117 commit ea8234e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,14 +435,16 @@ If you want to use this library in a CMake project as a static library, you can
435435
FetchContent_Declare(llhttp
436436
URL "https://github.com/nodejs/llhttp/archive/refs/tags/release/v8.1.0.tar.gz")
437437
438-
set(BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
439-
set(BUILD_STATIC_LIBS ON CACHE INTERNAL "")
438+
set(LLHTTP_BUILD_SHARED_LIBS OFF CACHE INTERNAL "")
439+
set(LLHTTP_BUILD_STATIC_LIBS ON CACHE INTERNAL "")
440440
FetchContent_MakeAvailable(llhttp)
441441
442442
# Link with the llhttp_static target
443443
target_link_libraries(${EXAMPLE_PROJECT_NAME} ${PROJECT_LIBRARIES} llhttp_static ${PROJECT_NAME})
444444
```
445445

446+
If using a version prior to 9.3.0, the `LLHTTP_BUILD_SHARED_LIBS` and `LLHTTP_BUILD_STATIC_LIBS` options are known as `BUILD_SHARED_LIBS` and `BUILD_STATIC_LIBS` and should be used instead.
447+
446448
_Note that using the git repo directly (e.g., via a git repo url and tag) will not work with FetchContent_Declare because [CMakeLists.txt](./CMakeLists.txt) requires string replacements (e.g., `_RELEASE_`) before it will build._
447449

448450
## Building on Windows

0 commit comments

Comments
 (0)