[CMake] How to define custom import library name (MSVC)?

zex spectrum zexspectrum at gmail.com
Sun Oct 16 12:27:42 EDT 2011


Hello,

I generate a shared library named, for example, mylib80.dll (it has
postfix "80", because I want to embed version info into library name.
I use set_target_properties with <Config>_POSTFIX property to achieve
this. By default, CMake names corresponding import library as
mylib80.lib. But I want my shared lib to have an import lib named
mylib.lib (without version embedded into its name). Is it possible at
all? I tried IMPORT_SUFFIX, but it seems to not work as I expect.

I use MSVC, I do not need to have this for GCC and other compilers.

Any help would be appreciated.


More information about the CMake mailing list