INSTALL-CMAKE.md: mention focus on shared libraries

Match what the INSTALL.md document says for configure builds.

Reported-by: Nemos2024 on github
Fixes #14845
Closes #15168
This commit is contained in:
Daniel Stenberg 2024-10-06 23:13:29 +02:00
parent 6fe1c3bc6a
commit 19af07e7ef
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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