CMake output name for dynamic-loaded library? CMake output name for dynamic-loaded library? python python

CMake output name for dynamic-loaded library?


You can unset the prefix with this line:

set_target_properties(foo PROPERTIES PREFIX "")


The prefix "lib" is a convention for unix/linux and is exploited widely by compilers (e.g. when you link you write -lfoo).

I don't know if you can force cmake to create foo.so instead of libfoo.so, but maybe you can use "libfoo" for python module. Another option is to create install target in cmake ,which will renmae libfoo.so to foo.so