[cmake-developers] A type for static plugins?
Brad King
brad.king at kitware.com
Fri Sep 20 09:57:26 EDT 2013
On 09/20/2013 09:10 AM, Stephen Kelly wrote:
> Brad King wrote:
>> add_library(mystatic_library STATIC foo.cpp)
>> set_property(TARGET mystatic_library PROPERTY QT_STATICPLUGIN 1)
>> target_link_libraries(mystatic_library Qt5::Core)
>
> Yes, but I don't think that's better than
>
> add_library(mystatic_library STATIC foo.cpp)
> target_compile_definitions(mystatic_library PRIVATE QT_STATICPLUGIN)
> target_link_libraries(mystatic_library Qt5::Core)
If Qt adds some other usage requirement for static modules in the
future then the declarative property is better than a user spelling
out the specific compile definitions requirement.
-Brad
More information about the cmake-developers
mailing list