Cmake's variables CMAKE_STATIC_LIBRARY_SUFFIX vs CMAKE_LINK_LIBRARY_SUFFIX

Viewed 560

In the cmake docs for variables, There are four suffix variables:

CMAKE_SHARED_LIBRARY_SUFFIX  # == .dll in Windows
CMAKE_STATIC_LIBRARY_SUFFIX  # == .lib in Windows
CMAKE_IMPORT_LIBRARY_SUFFIX  #
CMAKE_LINK_LIBRARY_SUFFIX    # == .lib in Windows

I understand the static, shared and even import (It's just by design that import libraries in windows are also .lib).

But I don't understand why the CMAKE_LINK_LIBRARY_SUFFIX exists; It seems like it's all of the others combined or something like it. The docs simply explains what's already in the variable name. can someone explain exactly what this variables are used for.

Edit:

Even though the docs for CMAKE_IMPORT_LIBRARY_SUFFIX don't say that by default on windows it is equal to .lib. when I test it's value on my windows machine, .lib is the default.

0 Answers
Related