Hello, In CMake, the MODULE_LIBRARY type is quite like a shared library which is not linked to. In Qt, there is a concept of a static plugin. This is essentially just a static library, but there is buildsystem awareness of the difference.
When building a static library using Qt, the QT_STATICPLUGIN preprocessor macro must be defined: http://doc-snapshot.qt-project.org/qt5-stable/qtcore/plugins-howto.html#static-plugins This affects the compilation of moc generated files (In Qt 5 plugin information is generated by moc). If CMake had a STATIC_MODULE library type, I would be able to add: $<$<STREQUAL:$<TARGET_PROPERTY:TYPE>,STATIC_MODULE>:QT_STATICPLUGIN> to the INTERFACE_COMPILE_DEFINITIONS of Qt5::Core, and all consumers wishing to create a static library would use add_library(mystatic_library STATIC_MODULE foo.cpp) target_link_libraries(mystatic_library Qt5::Core) and automatically get the correct definition set. Any comments on adding a new STATIC_MODULE type to CMake? Thanks, Steve. -- 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