summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Małek <michalm@jabster.pl>2014-08-07 20:55:37 (GMT)
committerMichał Małek <michalm@jabster.pl>2014-08-07 20:55:37 (GMT)
commitbfe7453628786247801f9c008ab172edbe726a07 (patch)
tree6b84a8d5eac6ae4dc2fdb6741ac2f061ee780538
parent162b9c8e9dcbdbff60f9e6586338423ab5f1d7bb (diff)
Splitted library into two: kccdb and kcddbwidgets
This change allows for more modular use of libkcddb. Applications that don't use QtWidgets may now use libkccdb without need of additional dependency.
-rw-r--r--kcmcddb/CMakeLists.txt2
-rw-r--r--libkcddb/CMakeLists.txt25
2 files changed, 18 insertions, 9 deletions
diff --git a/kcmcddb/CMakeLists.txt b/kcmcddb/CMakeLists.txt
index a645049..d8f1b9c 100644
--- a/kcmcddb/CMakeLists.txt
+++ b/kcmcddb/CMakeLists.txt
@@ -16,7 +16,7 @@ target_link_libraries(kcm_cddb PRIVATE
KF5::KIOCore
KF5::KIOWidgets
KF5::WidgetsAddons
- kcddb)
+ kcddbwidgets)
install(TARGETS kcm_cddb DESTINATION ${PLUGIN_INSTALL_DIR})
diff --git a/libkcddb/CMakeLists.txt b/libkcddb/CMakeLists.txt
index b92ef33..828a28a 100644
--- a/libkcddb/CMakeLists.txt
+++ b/libkcddb/CMakeLists.txt
@@ -15,8 +15,6 @@ if(MUSICBRAINZ5_FOUND)
set_source_files_properties(${musicbrainz_sources} PROPERTIES COMPILE_FLAGS ${enable_exceptions})
endif()
-qt5_wrap_ui(ui_sources cdinfodialog.ui cdinfoencodingwidget.ui)
-
kconfig_add_kcfg_files(kcfg_sources configbase.kcfgc)
add_library(kcddb SHARED
@@ -43,17 +41,13 @@ add_library(kcddb SHARED
synchttpsubmit.cpp
categories.cpp
genres.cpp
- cdinfodialog.cpp
- cdinfoencodingwidget.cpp
logging.cpp
${musicbrainz_sources}
- ${ui_sources}
${kcfg_sources})
target_link_libraries(kcddb
PUBLIC
KF5::ConfigGui
- Qt5::Widgets
PRIVATE
KF5::Codecs
KF5::I18n
@@ -64,11 +58,26 @@ if(MUSICBRAINZ5_FOUND)
target_link_libraries(kcddb PRIVATE musicbrainz)
endif()
+qt5_wrap_ui(ui_sources cdinfodialog.ui cdinfoencodingwidget.ui)
+
+add_library(kcddbwidgets SHARED
+ cdinfodialog.cpp
+ cdinfoencodingwidget.cpp
+ ${ui_sources})
+
+target_link_libraries(kcddbwidgets
+ PUBLIC
+ kcddb
+ Qt5::Widgets
+ PRIVATE
+ KF5::Codecs
+ KF5::I18n)
+
generate_export_header(kcddb)
-set_target_properties(kcddb PROPERTIES VERSION ${KCDDB_VERSION} SOVERSION ${KCDDB_SOVERSION})
+set_target_properties(kcddb kcddbwidgets PROPERTIES VERSION ${KCDDB_VERSION} SOVERSION ${KCDDB_SOVERSION})
-install(TARGETS kcddb EXPORT LibkcddbTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
+install(TARGETS kcddb kcddbwidgets EXPORT LibkcddbTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES
categories.h