On 09/20/2013 01:40 PM, Stephen Kelly wrote:
> macro(qt_add_plugin name type)
>   if (${type} STREQUAL STATIC OR ${type} STREQUAL MODULE)
>     set(_type ${type})
>     set(args ${ARGN})
>   else()
>     set(_type MODULE)
>     set(args ${type} ${ARGN}) 
>   endif()
>   add_library(${name} ${_type} ${ARGN})

s/ARGN/args/ ?

>   if (_type STREQUAL STATIC)
>     set_target_properties(${name} PROPERTIES
>       PLUGIN "1" 
>       # Not sure if this is a Qt/KDE convention:
>       PREFIX ""
>     )
>   endif()
> endmacro()

Don't you want an empty prefix for MODULE too?

> A remaining question is whether the 'PLUGIN' target property should be a 
> CMake built-in target property or a QT_ prefixed one?

It is added and used by Qt infrastructure, so QT_ is appropriate.
That will stay out of the way of possible future CMake builtin
support.  Also, can't QT_PLUGIN just be set on the target to
indicate it is a plugin, whether it is STATIC or MODULE?  Then
generator expressions can do the right thing based on both the
target type and the presence of the QT_PLUGIN property.

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to