Commit 384696ac authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

introduce a object library for shared stuff

avoid that we need to add the sources to all users
will allow to have more or less the same sharing as
with an internal static libary but works for linking
in the different dynamic libs
parent d1de1fb0
Pipeline #141898 passed with stage
in 6 minutes and 29 seconds
......@@ -52,6 +52,7 @@ find_package(KF5 ${KF5_DEP_VERSION}
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050d00)
ecm_optional_add_subdirectory(shared)
ecm_optional_add_subdirectory(addons)
ecm_optional_add_subdirectory(kwrite)
ecm_optional_add_subdirectory(kate)
......
......@@ -4,6 +4,7 @@ target_compile_definitions(lspclientplugin PRIVATE TRANSLATION_DOMAIN="lspclient
target_link_libraries(
lspclientplugin
PRIVATE
$<TARGET_OBJECTS:kateshared>
KF5::I18n
KF5::TextEditor
)
......@@ -35,8 +36,6 @@ target_sources(
lsptooltip.cpp
gotosymboldialog.cpp
${CMAKE_SOURCE_DIR}/shared/quickdialog.cpp # hud dialog
plugin.qrc
)
......@@ -46,7 +45,6 @@ target_include_directories(
${CMAKE_SOURCE_DIR}/shared
)
if(BUILD_TESTING)
add_subdirectory(tests)
endif()
......@@ -20,6 +20,7 @@ target_compile_definitions(kateprojectplugin PRIVATE TRANSLATION_DOMAIN="katepro
target_link_libraries(
kateprojectplugin
PRIVATE
$<TARGET_OBJECTS:kateshared>
Qt5::Concurrent
KF5::GuiAddons
KF5::I18n
......@@ -69,7 +70,6 @@ target_sources(
gitcommitdialog.cpp
stashdialog.cpp
filehistorywidget.cpp
${CMAKE_SOURCE_DIR}/shared/quickdialog.cpp
pushpulldialog.cpp
comparebranchesview.cpp
branchdeletedialog.cpp
......
add_library(kateshared OBJECT
quickdialog.cpp
)
target_include_directories(kateshared PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
find_package(
KF5 ${KF5_DEP_VERSION}
QUIET
REQUIRED
COMPONENTS
TextEditor
DBusAddons
Crash
)
target_link_libraries(
kateshared
PUBLIC
KF5::I18n
KF5::TextEditor
KF5::DBusAddons
KF5::Crash
)
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