Define `QT_STATICPLUGIN` when building static Qt plugins
This requirement is documented here: https://doc.qt.io/qt-5/plugins-howto.html#creating-static-plugins
This commit is contained in:
parent
030e6a2034
commit
9c9a47e551
|
@ -101,7 +101,7 @@ else ()
|
||||||
set(TARGET_INCLUDE_DIRECTORY_BUILD_INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
set(TARGET_INCLUDE_DIRECTORY_BUILD_INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
# add target for building the library
|
# configure target type for building the library
|
||||||
if (BUILD_SHARED_LIBS)
|
if (BUILD_SHARED_LIBS)
|
||||||
if (META_IS_PLUGIN)
|
if (META_IS_PLUGIN)
|
||||||
set(META_LIBRARY_TYPE MODULE)
|
set(META_LIBRARY_TYPE MODULE)
|
||||||
|
@ -110,8 +110,14 @@ if (BUILD_SHARED_LIBS)
|
||||||
endif ()
|
endif ()
|
||||||
else ()
|
else ()
|
||||||
set(META_LIBRARY_TYPE STATIC)
|
set(META_LIBRARY_TYPE STATIC)
|
||||||
|
|
||||||
|
# define QT_STATICPLUGIN when building static Qt plugins
|
||||||
|
if ("${META_PROJECT_TYPE}" STREQUAL "qtplugin")
|
||||||
|
list(APPEND META_PRIVATE_COMPILE_DEFINITIONS QT_STATICPLUGIN)
|
||||||
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
# add custom libraries
|
# add custom libraries
|
||||||
append_user_defined_additional_libraries()
|
append_user_defined_additional_libraries()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue