Fwd: [CMake] Generating static and shared libs

Alexander Camek alexander at camek.de
Tue Nov 13 15:47:18 EST 2007


Hi,

>> I am using here MinGW C and C++ source code to build some libraries.
>>
>> Now what me wonders is that I am getting sometimes static libraries
>> additional to my dynamic libraries.
> 
> I think you are talking about the "import library"
> 
> http://www.mingw.org/MinGWiki/index.php/sample%20DLL

Nope, I don't talk about that.

I am talking about the problem, that when I use ADD_LIBRARY(libname 
SHARED ${SOURCE}) and I let all my files create in a common directory 
setted with LIBRARY_OUTPUT_PATH, then sometimes both are created.

So as an example I find there both kind of files.
I have got there a libname.dll and a libname.dll.a.

If this is a desired result, then why both the .dll and .dll.a are not 
generated.


> I don't know MinGW well but I think its different from static libs.
> 
>> Although I always build shared libraries.
>>
>> What is the strategy when to build only the dynamic libraries and when
>> to build both?
> 
> I think you'll find answers in MinGW docs and not in CMake

I think this is a CMake problem ;).

Alexander


More information about the CMake mailing list