[CMake] creating static library with references to other .lib
files
Keith T. Garner
kgarner at kgarner.com
Wed Jun 13 11:13:51 EDT 2007
On 6/12/07 5:36 PM, Jesper Eskilson wrote:
> What you're asking for seems kinda weird. What's the motive?
>
> foo.obj and bar.obj uses symbols in mydll.dll, and I want to allow users
> of mystatic.lib to just have to link with mystaticlib.lib, and not with
> mydll.lib.
>
> Note that an import library on Windows *is* a static library (both
> having the .lib suffix is not a coincidence). The only special thing
> with an import library is that it exports symbols with a note that the
> symbol really should be found at runtime in the given dll. So,
>
> lib /out:foo.lib bar.obj fie.lib
>
> puts all the contents of bar.obj and fie.lib into foo.lib. This is very
> practical.
>
> Hope that makes it a little clearer.
For the record, I have the exact same need for a library that my department
puts out. Its one of the things keeping me from moving over to CMake for
our project[1]. Its so much easier to distribute the win32 version this
way. One of our other projects is also dependent on that behavior. I could
change that, but I'd rather figure out how to have CMake build this way.
Keith
[1] http://www.crt.realtors.org/projects/rets/librets
--
Keith T. Garner kgarner at kgarner.com
"Make no little plans; they have no magic to
stir men's blood." - Daniel H. Burnham
More information about the CMake
mailing list