]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
INSTALL-CMAKE.md: mention focus on shared libraries
authorDaniel Stenberg <daniel@haxx.se>
Sun, 6 Oct 2024 21:13:29 +0000 (23:13 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 7 Oct 2024 06:22:15 +0000 (08:22 +0200)
Match what the INSTALL.md document says for configure builds.

Reported-by: Nemos2024 on github
Fixes #14845
Closes #15168

docs/INSTALL-CMAKE.md

index 0457efe2dcef35dc89b44f2901e8a68d30c3ebe4..4b9e16c7065fdada3ffa825421e9ff6efe9cd152 100644 (file)
@@ -107,6 +107,25 @@ Build (you have to specify the build directory).
 
     $ cmake --build ../curl-build
 
+## Static builds
+
+The CMake build setup is primarily done to work with shared/dynamic third
+party dependencies. When linking with shared libraries, the dependency "chain"
+is handled automatically by the library loader - on all modern systems.
+
+If you instead link with a static library, you need to provide all the
+dependency libraries already at the link command line.
+
+Figuring out all the dependency libraries for a given library is hard, as it
+might involve figuring out the dependencies of the dependencies and they vary
+between platforms and can change between versions.
+
+When using static dependencies, the build scripts mostly assume that you, the
+user, provide all the necessary additional dependency libraries as additional
+arguments in the build.
+
+Building statically is not for the faint of heart.
+
 ### Fallback for CMake before version 3.13
 
 CMake before version 3.13 does not support the `--build` option. In that