[Cmake] About the library file name created by CMake (in CMakelist.txt)

Bill Hoffman bill . hoffman at kitware . com
Thu, 07 Aug 2003 10:50:58 -0400


Yes and no.

The lib is required by the OS for libraries that you can link to.
However, for loadable modules some systems like swig require that
there be no prefix.

You can set the prefix like this:

 SET_TARGET_PROPERTIES( sample PROPERTIES PREFIX "")

But note, that you will not be able to link to the sample library from
cmake at this point.

-Bill

At 10:41 AM 8/7/2003, Amy Lin wrote:
>In CMalkelist.txt file, I have added some libraries: such as:
>
>ADD_LIBRARY(sample SHARED sample.cpp)
>
>It will create a library named as "libsample.so".  It always add prefix "lib" for all the library it created.  Is there a way to get rid of this prefix, the "lib"?
>
>Thanx a lot.
>
>-Amy
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at www . cmake . org
>http://www . cmake . org/mailman/listinfo/cmake