[cmake-developers] A type for static plugins?
Stephen Kelly
steveire at gmail.com
Fri Sep 20 09:59:58 EDT 2013
Brad King wrote:
>> So the answer is, 'probably nothing'.
>
> In that case I do not think we can justify a special CMake
> target type for it. All the special cases for STATIC_LIBRARY
> targets will have to be updated to also account for the new
> type with no difference in logic.
Another alternative would be for
add_library(myplugin STATIC_MODULE foo.cpp)
be exactly equivalent to
add_library(myplugin STATIC foo.cpp)
set_property(TARGET myplugin PROPERTY STATICPLUGIN 1)
and document the STATICPLUGIN target property. Then I can use that in the
Qt5::Core INTERFACE_COMPILE_DEFINITIONS, and no handling of static libraries
in CMake would need to be extended for the new type. The cmAddLibraryCommand
would set the property.
Thanks,
Steve.
More information about the cmake-developers
mailing list