[Cmake] How to change the default output file name for libraries in Linux

Raghavendra Chandrashekara rc3 at doc.ic.ac.uk
Thu, 08 Apr 2004 10:27:56 +0100


I tried putting ADD_LIBRARY(mymodule MODULE ...) in the CMakeLists.txt 
file but the target still has a lib prefix. What I am trying to do is 
create a module for python using swig. But in the wrapper python code 
generated by swig, the first line reads:

import _mymodule

so the library needs to be called _mymodule.so. Will I have to manually 
rename the files my self?

Thanks,

Raghavendra

PS. Will swig be supported in any upcoming releases of CMake?

William A. Hoffman wrote:

>There are some OS issues here.   For UNIX, to link with -lmylibrary, the
>library must be libmylibrary.so.   For win32 dll's, the library must be 
>mylibrary.dll and mylibrary.lib, but cmake should not add a lib infront.
>If this is a loadable module and not really a library, then you might want to
>try ADD_LIBRARY(mymodule MODULE ...)
>
>-Bill
>
>
>At 02:02 PM 4/7/2004, Raghavendra Chandrashekara wrote:
>  
>
>>Hi,
>>
>>Is there a way to change the default library name for the ADD_LIBRARY(mylibrary SHARED ${mylibrary_SOURCES}) command. I want to create a library which is called mylibrary.dll and not libmylibrary.dll
>>
>>Thanks,
>>
>>Raghavendra
>>
>>_______________________________________________
>>Cmake mailing list
>>Cmake at www.cmake.org
>>http://www.cmake.org/mailman/listinfo/cmake
>>    
>>
>
>  
>