Commit 3b1bc987 authored by Vitaly Fanaskov's avatar Vitaly Fanaskov

Add static build support

It's possible to build the framework as set of static libraries now.
Use -DBUILD_SHARED_LIBS=OFF to emable static build.

The following libraries will be created:
libKUserFeedbackCore.a
libKUserFeedbackWidgets.a
libKUserFeedbackCommon.a

You have to keep them in order listed above, when linking your app
against them.
parent c012626e
......@@ -33,5 +33,10 @@ add_library(KUserFeedbackCommon STATIC
${FLEX_surveytargetexpressionscanner_OUTPUTS}
)
if (NOT BUILD_SHARED_LIBS)
install(TARGETS KUserFeedbackCommon
EXPORT KUserFeedbackTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
endif()
target_include_directories(KUserFeedbackCommon PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR};${CMAKE_CURRENT_SOURCE_DIR}/..>")
target_link_libraries(KUserFeedbackCommon LINK_PRIVATE Qt5::Core)
......@@ -25,7 +25,7 @@ set(userfeedback_core_srcs
${userfeedback_core_QM_LOADER}
)
add_library(KUserFeedbackCore SHARED ${userfeedback_core_srcs})
add_library(KUserFeedbackCore ${userfeedback_core_srcs})
set_target_properties(KUserFeedbackCore PROPERTIES
SOVERSION ${KUSERFEEDBACK_SOVERSION}
VERSION ${KUSERFEEDBACK_VERSION_STRING}
......
......@@ -6,7 +6,7 @@ set(userfeedback_widgets_srcs
auditlogbrowserdialog.cpp
)
add_library(KUserFeedbackWidgets SHARED ${userfeedback_widgets_srcs})
add_library(KUserFeedbackWidgets ${userfeedback_widgets_srcs})
set_target_properties(KUserFeedbackWidgets PROPERTIES
SOVERSION ${KUSERFEEDBACK_SOVERSION}
VERSION ${KUSERFEEDBACK_VERSION_STRING}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment