[cmake-developers] A type for static plugins?
Brad King
brad.king at kitware.com
Fri Sep 20 10:03:23 EDT 2013
On 09/20/2013 09:59 AM, Stephen Kelly wrote:
> 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)
IMO that's too special-purpose. However, since it is so common to
add a library and then set properties on it, perhaps there should be
a syntax in add_library and add_executable to inline property settings.
For example, we could add a keyword signature to declare SOURCES
and PROPERTIES in one call:
add_library(myplugin STATIC
SOURCES foo.cpp
PROPERTIES QT_STATICPLUGIN "1"
)
-Brad
More information about the cmake-developers
mailing list