1.

Can I Build Both Shared And Static Libraries With One Add_library Command?

Answer»

No. Each library you build MUST have a unique TARGET name, i.e. the "libname" field of the ADD_LIBRARY COMMAND. That way, CMake can trackdependencies SEPARATELY for each library. LIBRARIES can have the same OUTPUT_NAME, see the SET_TARGET_PROPERTIES command, but this is not the default.

No. Each library you build must have a unique target name, i.e. the "libname" field of the ADD_LIBRARY command. That way, CMake can trackdependencies separately for each library. Libraries can have the same OUTPUT_NAME, see the SET_TARGET_PROPERTIES command, but this is not the default.



Discussion

No Comment Found