[Cmake] Default output name for DLL

Geoffrey Cross geoff at robots . ox . ac . uk
Thu, 17 Jan 2002 11:12:41 -0000


I just did a cvs update, and have now got a whole range of little
problems, the most puzzling being:

I am building a bunch of dlls, which worked just fine under my previous
cmake installation (dating back to around the beginning of December).
The relevant line in my CMakeLists is:

ADD_LIBRARY(something SHARED something_sources)

In order to get the correct entry point, something_sources also needed
to include a .def file containing just the line:

EXPORTS entry_point_function_name

However, for some unknown reason, this no longer works and I get the
standard LNK1561 (entry point not defined) error.  Finally, I found that
the .def file now needs to include the library name:

LIBRARY something
EXPORTS entry_point_function_name

That's solved, but I'm confused as to why this is necessary now, but
previously it wasn't (it also makes things slightly less pretty, as I
used to include the same .def file to generate a whole range of DLLS all
with the same entry point).

More annoying, however, is that for some reason the DLL generated now
has a .exe extension!  If I rename it to *.dll, everything works just
fine, but why!???!

Geoff.