cmake: allow empty custom IMPORT_LIB_SUFFIX, add suffix collision detection

Allow overriding the `IMPORT_LIB_SUFFIX` default with an empty value.

Also:
- add a fatal error if the implib and static lib filename are identical.
- clarify `IMPORT_LIB_SUFFIX` default value in the documentation.

Reported-by: RubisetCie on Github
Fixes #16324
Ref: 1199308dbc #11505

Closes #16332
This commit is contained in:
Viktor Szakats 2025-02-14 11:35:12 +01:00
parent e7adf3e837
commit 1b87357967
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
2 changed files with 17 additions and 8 deletions

View file

@ -167,7 +167,7 @@ assumes that CMake generates `Makefile`:
- `ENABLE_CURLDEBUG`: Enable TrackMemory debug feature. Default: =`ENABLE_DEBUG`
- `ENABLE_CURL_MANUAL`: Build the man page for curl and enable its `-M`/`--manual` option. Default: `ON`
- `ENABLE_DEBUG`: Enable curl debug features (for developing curl itself). Default: `OFF`
- `IMPORT_LIB_SUFFIX`: Import library suffix. Default: `_imp`
- `IMPORT_LIB_SUFFIX`: Import library suffix. Default: `_imp` for MSVC-like toolchains, otherwise empty.
- `LIBCURL_OUTPUT_NAME`: Basename of the curl library. Default: `libcurl`
- `PICKY_COMPILER`: Enable picky compiler options. Default: `ON`
- `STATIC_LIB_SUFFIX`: Static library suffix. Default: (empty)