[qt] Don't add import/export when building inside Qt plugin. (#394) (#395)

[qt] Do not add import/export into headers when building inside Qt plugin. (#394)

Co-authored-by: Tadej Novak <tadej@tano.si>
This commit is contained in:
kiibimees
2022-08-13 12:12:32 +03:00
committed by GitHub
parent a2b8b6135f
commit a261c59b23

View File

@@ -280,12 +280,19 @@ if (MBGL_QT_STATIC AND NOT MBGL_QT_INSIDE_PLUGIN)
$<$<NOT:$<BOOL:${MBGL_QT_WITH_INTERNAL_SQLITE}>>:Qt${QT_VERSION_MAJOR}::Sql>
$<$<NOT:$<OR:$<PLATFORM_ID:Windows>,$<PLATFORM_ID:Emscripten>>>:z>
)
endif()
if (MBGL_QT_STATIC OR MBGL_QT_INSIDE_PLUGIN)
# Don't add import/export into public header because we don't build shared library.
# In case on MBGL_QT_INSIDE_PLUGIN it's always OBJECT library and bundled into one
# single Qt plugin lib.
target_compile_definitions(
qmaplibregl
PUBLIC QT_MAPLIBREGL_STATIC
)
endif()
install(TARGETS qmaplibregl
EXPORT QMapLibreGLTargets
# Explicit set of DESTINATION is needed for older CMake versions.