generic: misc cleanups

This commit is contained in:
Ivailo Monev 2015-09-26 03:10:52 +00:00
parent de12b3aad5
commit 67bf56db3e
3 changed files with 27 additions and 30 deletions

View file

@ -1,7 +1,4 @@
project(KDEBASE_WORKSPACE) project(KDEBASE_WORKSPACE)
# set_package_properties appeared in cmake 2.8.6
# TODO: Remove when kdelibs >= 4.10 will be required
cmake_minimum_required(VERSION 2.8.6 FATAL_ERROR)
include(CTest) include(CTest)
include(CTestConfig.cmake) include(CTestConfig.cmake)
@ -11,9 +8,6 @@ include(CheckFunctionExists)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH} ) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH} )
#search packages used by KDE
set(QT_MIN_VERSION "4.8.2")
find_package(KDE4 4.14.3 REQUIRED) find_package(KDE4 4.14.3 REQUIRED)
include(KDE4Defaults) include(KDE4Defaults)
@ -173,20 +167,20 @@ add_subdirectory(cmake)
add_subdirectory(libs) add_subdirectory(libs)
macro_optional_add_subdirectory( systemsettings ) macro_optional_add_subdirectory(systemsettings )
# core apps # core apps
macro_optional_add_subdirectory( kcheckpass ) macro_optional_add_subdirectory(kcheckpass)
macro_optional_add_subdirectory( kwin ) macro_optional_add_subdirectory(kwin)
macro_optional_add_subdirectory( ksmserver ) macro_optional_add_subdirectory(ksmserver)
find_package(JPEG REQUIRED) find_package(JPEG REQUIRED)
find_package(PNG REQUIRED) find_package(PNG REQUIRED)
macro_optional_add_subdirectory( ksplash ) macro_optional_add_subdirectory(ksplash)
macro_optional_add_subdirectory( powerdevil ) macro_optional_add_subdirectory(powerdevil)
macro_optional_add_subdirectory( qguiplatformplugin_kde ) macro_optional_add_subdirectory(qguiplatformplugin_kde)
macro_optional_add_subdirectory( ksysguard ) macro_optional_add_subdirectory(ksysguard)
macro_optional_add_subdirectory(kcontrol) macro_optional_add_subdirectory(kcontrol)
macro_optional_add_subdirectory(klipper) macro_optional_add_subdirectory(klipper)

View file

@ -1,7 +1,4 @@
include_directories( include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR})
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
)
include_directories(${DBUSMENUQT_INCLUDE_DIR}) include_directories(${DBUSMENUQT_INCLUDE_DIR})
@ -16,7 +13,7 @@ set(kded_appmenu_SRCS
glowbar.cpp glowbar.cpp
verticalmenu.cpp verticalmenu.cpp
shadows.cpp shadows.cpp
) )
qt4_add_dbus_adaptor(kded_appmenu_SRCS com.canonical.AppMenu.Registrar.xml qt4_add_dbus_adaptor(kded_appmenu_SRCS com.canonical.AppMenu.Registrar.xml
menuimporter.h MenuImporter menuimporteradaptor MenuImporterAdaptor) menuimporter.h MenuImporter menuimporteradaptor MenuImporterAdaptor)
@ -26,12 +23,17 @@ qt4_add_dbus_adaptor(kded_appmenu_SRCS org.kde.kded.appmenu.xml
kde4_add_plugin(kded_appmenu ${kded_appmenu_SRCS}) kde4_add_plugin(kded_appmenu ${kded_appmenu_SRCS})
target_link_libraries(kded_appmenu ${KDE4_KIO_LIBS} ${X11_LIBRARIES} ${DBUSMENUQT_LIBRARIES} ${KDE4_PLASMA_LIBS}) target_link_libraries(kded_appmenu
${KDE4_KIO_LIBS}
${X11_LIBRARIES}
${DBUSMENUQT_LIBRARIES}
${KDE4_PLASMA_LIBS}
)
install(TARGETS kded_appmenu DESTINATION ${PLUGIN_INSTALL_DIR} ) install(TARGETS kded_appmenu DESTINATION ${PLUGIN_INSTALL_DIR} )
########### install files ############### ########### install files ###############
install( FILES appmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded ) install(FILES appmenu.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded)
install( FILES com.canonical.AppMenu.Registrar.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} ) install(FILES com.canonical.AppMenu.Registrar.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
install( FILES org.kde.kded.appmenu.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} ) install(FILES org.kde.kded.appmenu.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})

View file

@ -18,11 +18,13 @@ set(libklipper_common_SRCS
) )
macro_optional_find_package(Prison QUIET CONFIG) macro_optional_find_package(Prison QUIET CONFIG)
set_package_properties(Prison PROPERTIES DESCRIPTION "Prison library" set_package_properties(Prison PROPERTIES
URL "http://projects.kde.org/prison" DESCRIPTION "Prison library"
TYPE OPTIONAL URL "http://projects.kde.org/prison"
PURPOSE "Needed to create mobile barcodes from clipboard data" TYPE OPTIONAL
) PURPOSE "Needed to create mobile barcodes from clipboard data"
)
if (PRISON_FOUND) if (PRISON_FOUND)
add_definitions(-DHAVE_PRISON) add_definitions(-DHAVE_PRISON)
include_directories(${PRISON_INCLUDE_DIR}) include_directories(${PRISON_INCLUDE_DIR})
@ -32,7 +34,6 @@ kde4_add_kcfg_files(libklipper_common_SRCS klippersettings.kcfgc)
set(klipper_SRCS ${libklipper_common_SRCS} main.cpp tray.cpp) set(klipper_SRCS ${libklipper_common_SRCS} main.cpp tray.cpp)
add_executable(klipper ${klipper_SRCS}) add_executable(klipper ${klipper_SRCS})
target_link_libraries(klipper ${KDE4_KDEUI_LIBS} ${X11_LIBRARIES} ${ZLIB_LIBRARY}) target_link_libraries(klipper ${KDE4_KDEUI_LIBS} ${X11_LIBRARIES} ${ZLIB_LIBRARY})
@ -43,7 +44,7 @@ if (PRISON_FOUND)
target_link_libraries(klipper ${PRISON_LIBRARIES}) target_link_libraries(klipper ${PRISON_LIBRARIES})
endif (PRISON_FOUND) endif (PRISON_FOUND)
install(TARGETS klipper ${INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS klipper ${INSTALL_TARGETS_DEFAULT_ARGS})
install(PROGRAMS klipper.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) install(PROGRAMS klipper.desktop DESTINATION ${XDG_APPS_INSTALL_DIR})
install(PROGRAMS klipper.desktop DESTINATION ${AUTOSTART_INSTALL_DIR}) install(PROGRAMS klipper.desktop DESTINATION ${AUTOSTART_INSTALL_DIR})