On 09/20/2013 12:03 PM, Stephen Kelly wrote: > if (my_lib_type STREQUAL SHARED) > add_library(some_plugin MODULE main.cpp) > else() > add_library(some_plugin STATIC > SOURCES main.cpp > PROPERTIES > STATICPLUGIN 1 > # If we need this anyway, we might as well move it upscope > # and remove the CMAKE_SHARED_MODULE_PREFIX setting, replacing > # it with > # set_property(TARGET some_plugin PROPERTY PREFIX "") > PREFIX "" > ) > endif()
That has to duplicate the list of sources, and the properties make the add_library call start to look pretty verbose anyways. Currently we can just do: set(plugin_type ...) # MODULE or STATIC add_library(some_plugin ${plugin_type} main.cpp) set_target_properties(some_plugin PROPERTIES PLUGIN "1" PREFIX "") Can't this be packaged up in a qt_add_plugin() API? > seems another gain from adding a STATIC_MODULE type would be control of > things like the default PREFIX Yes, but everything is already possible to achieve without a new target type, and a new type will add a lot of complexity. -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