Commit 155a3f13 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Cleanup font libraries cmake code

Use imported targets

separate private and public dependencies for kfontinst
parent 97022f2f
# KI18N Translation Domain for this library
add_definitions(-DTRANSLATION_DOMAIN=\"kcm_fonts\")
if(FONTCONFIG_FOUND)
include_directories(${FONTCONFIG_INCLUDE_DIR})
endif()
include_directories(${FREETYPE_INCLUDE_DIRS})
########### next target ###############
include_directories(../kfontinst/lib)
......@@ -28,7 +23,7 @@ kconfig_add_kcfg_files(kcm_fonts_PART_SRCS fontssettings.kcfgc fontsaasettingsba
add_library(kcm_fonts MODULE ${kcm_fonts_PART_SRCS})
target_link_libraries(kcm_fonts Qt::DBus Qt::Xml KF5::KCMUtils KF5::I18n KF5::KDELibs4Support ${FREETYPE_LIBRARIES} kfontinst)
target_link_libraries(kcm_fonts Qt::DBus Qt::Xml KF5::KCMUtils KF5::I18n KF5::KDELibs4Support kfontinst)
if(X11_FOUND)
target_link_libraries(kcm_fonts
......@@ -39,10 +34,9 @@ if(X11_FOUND)
KF5::Declarative
KF5::QuickAddons
KF5::WidgetsAddons
PW::KWorkspace)
if(FONTCONFIG_FOUND)
target_link_libraries(kcm_fonts ${FONTCONFIG_LIBRARIES})
endif()
PW::KWorkspace
XCB::IMAGE
)
target_link_libraries(kcm_fonts X11::X11 X11::Xft)
endif()
......
......@@ -5,8 +5,6 @@ if (X11_Xft_FOUND)
check_include_files(locale.h HAVE_LOCALE_H)
configure_file(config-fontinst.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-fontinst.h)
include_directories(
${FREETYPE_INCLUDE_DIRS}
${FONTCONFIG_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/lib
......
......@@ -25,7 +25,6 @@ target_link_libraries(kfontinst_bin
target_link_libraries(kfontprint_bin
Qt::PrintSupport
KF5::IconThemes
${FREETYPE_LIBRARIES}
kfontinstui
kfontinst
)
......
......@@ -13,11 +13,11 @@ add_executable(fontinst_helper ${fontinst_helper_SRCS})
set_target_properties(fontinst_bin PROPERTIES OUTPUT_NAME fontinst)
target_link_libraries(fontinst_bin
Qt::DBus Qt::Xml KF5::AuthCore ${FONTCONFIG_LIBRARIES} kfontinst)
Qt::DBus Qt::Xml KF5::AuthCore KF5::KIOCore kfontinst)
set_target_properties(fontinst_helper PROPERTIES OUTPUT_NAME fontinst_helper)
target_link_libraries(fontinst_helper
Qt::DBus Qt::Xml KF5::AuthCore ${FONTCONFIG_LIBRARIES} kfontinst)
Qt::DBus Qt::Xml KF5::AuthCore KF5::KIOCore kfontinst)
install(TARGETS fontinst_bin DESTINATION ${KAUTH_HELPER_INSTALL_DIR} )
install(TARGETS fontinst_helper DESTINATION ${KAUTH_HELPER_INSTALL_DIR} )
......
......@@ -5,19 +5,19 @@ configure_file(config-paths.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-paths.h)
add_library(kfontinst SHARED ${kfontinst_LIB_SRCS})
target_link_libraries(kfontinst
Qt::Xml
Qt::DBus
Qt::Gui
PUBLIC
KF5::I18n
KF5::KIOCore
${FREETYPE_LIBRARIES}
${FONTCONFIG_LIBRARIES}
XCB::XCB
Fontconfig::Fontconfig
PRIVATE
Qt::Xml
Qt::Gui
XCB::IMAGE
)
set_target_properties(kfontinst PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} )
add_library(kfontinstui SHARED ${kfontinstui_LIB_SRCS})
target_link_libraries(kfontinstui Qt::X11Extras KF5::KIOCore KF5::KIOWidgets ${FREETYPE_LIBRARIES} ${FONTCONFIG_LIBRARIES} X11::X11 X11::Xft kfontinst )
target_link_libraries(kfontinstui Qt::X11Extras KF5::KIOCore KF5::KIOWidgets X11::X11 X11::Xft XCB::IMAGE kfontinst )
set_target_properties(kfontinstui PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} )
install(TARGETS kfontinst kfontinstui ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
......@@ -8,7 +8,7 @@ set(kfontviewpart_PART_SRCS ${libkfontinstview_SRCS} ${libkfontinstdbusiface_SRC
add_library(kfontviewpart MODULE ${kfontviewpart_PART_SRCS})
target_link_libraries(kfontviewpart KF5::Archive KF5::Parts KF5::XmlGui ${FONTCONFIG_LIBRARIES} kfontinstui kfontinst )
target_link_libraries(kfontviewpart KF5::Archive KF5::Parts KF5::XmlGui kfontinstui kfontinst )
install(TARGETS kfontviewpart DESTINATION ${KDE_INSTALL_PLUGINDIR} )
install( FILES kfontviewpart.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/kfontinst )
......
Supports Markdown
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