From 89bafd4c8daa0f33cd01f855d7431cb985c0852a Mon Sep 17 00:00:00 2001 From: Bob Chen Date: Wed, 27 Mar 2024 23:08:14 +0800 Subject: [PATCH] update doc --- doc/docs/introduction/how-to-build.md | 12 +++++++++++- .../current/introduction/how-to-build.md | 14 +++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/doc/docs/introduction/how-to-build.md b/doc/docs/introduction/how-to-build.md index 46a59dca..4266c6f2 100644 --- a/doc/docs/introduction/how-to-build.md +++ b/doc/docs/introduction/how-to-build.md @@ -177,7 +177,7 @@ ctest | PHOTON_ENABLE_FSTACK_DPDK | OFF | Enable F-Stack and DPDK. Requires both. | | PHOTON_ENABLE_EXTFS | OFF | Enable extfs. Requires `libe2fs` | -#### Example +#### Case 1. Staitcally build all third-party libs Build all the dependencies from source, so you can distribute Photon binary anywhere, as long as libc and libc++ versions suffice. @@ -194,3 +194,13 @@ cmake -B build -D CMAKE_BUILD_TYPE=RelWithDebInfo \ -D PHOTON_GFLAGS_SOURCE=https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz \ -D PHOTON_GOOGLETEST_SOURCE=https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz ``` + +#### Case 2. Dynamically link to libcurl.so and libssl.so + +```bash +cmake -B build -D CMAKE_BUILD_TYPE=RelWithDebInfo \ +-D PHOTON_BUILD_DEPENDENCIES=ON \ +-D PHOTON_AIO_SOURCE=https://pagure.io/libaio/archive/libaio-0.3.113/libaio-0.3.113.tar.gz \ +-D PHOTON_CURL_SOURCE="" \ +-D PHOTON_OPENSSL_SOURCE="" +``` \ No newline at end of file diff --git a/doc/i18n/cn/docusaurus-plugin-content-docs/current/introduction/how-to-build.md b/doc/i18n/cn/docusaurus-plugin-content-docs/current/introduction/how-to-build.md index ec8670bc..4eb8d62b 100644 --- a/doc/i18n/cn/docusaurus-plugin-content-docs/current/introduction/how-to-build.md +++ b/doc/i18n/cn/docusaurus-plugin-content-docs/current/introduction/how-to-build.md @@ -177,7 +177,7 @@ ctest | PHOTON_ENABLE_FSTACK_DPDK | OFF | 开启 F-Stack and DPDK,需要两者的库 | | PHOTON_ENABLE_EXTFS | OFF | 开启 extfs. 需要 `libe2fs` | -#### 例子 +#### 例子1 用源码编译所有依赖,这样你就可以随意分发Photon二进制了,只要运行机器上的libc和libc++的版本满足条件。 @@ -194,3 +194,15 @@ cmake -B build -D CMAKE_BUILD_TYPE=RelWithDebInfo \ -D PHOTON_GFLAGS_SOURCE=https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz \ -D PHOTON_GOOGLETEST_SOURCE=https://github.com/google/googletest/archive/refs/tags/release-1.12.1.tar.gz ``` + +#### 例子2 + +动态依赖 libcurl.so 和 libssl.so,libaio 源码编译 + +```bash +cmake -B build -D CMAKE_BUILD_TYPE=RelWithDebInfo \ +-D PHOTON_BUILD_DEPENDENCIES=ON \ +-D PHOTON_AIO_SOURCE=https://pagure.io/libaio/archive/libaio-0.3.113/libaio-0.3.113.tar.gz \ +-D PHOTON_CURL_SOURCE="" \ +-D PHOTON_OPENSSL_SOURCE="" +``` \ No newline at end of file