not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / kcontrol / input / CMakeLists.txt
blob3b569cdeb050494357e7cfc334e5ec4765fe33dd
2 add_subdirectory( pics ) 
3 KDE4_NO_ENABLE_FINAL(input)
5 macro_optional_find_package(USB)
6 macro_bool_to_01(LIBUSB_FOUND HAVE_LIBUSB)
7 macro_log_feature(LIBUSB_FOUND "libusb" "User level access to USB devices" "http://libusb.sourceforge.net/" FALSE "" "Provides Logitech mouse support in KControl.")
8 configure_file (config-kcontrol-input.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kcontrol-input.h )
10 include_directories( ${KDE4_INCLUDES} )
13 if (LIBUSB_FOUND)
14   include_directories( ${LIBUSB_INCLUDE_DIR} )
15 endif (LIBUSB_FOUND)
17 if(X11_Xcursor_FOUND)
18   set( libnoinst_SRCS
19     xcursor/themepage.cpp
20     xcursor/thememodel.cpp
21     xcursor/cursortheme.cpp
22     xcursor/legacytheme.cpp
23     xcursor/xcursortheme.cpp
24     xcursor/previewwidget.cpp
25     xcursor/itemdelegate.cpp
26     xcursor/sortproxymodel.cpp
27     ../krdb/krdb.cpp )
28   kde4_add_ui_files( libnoinst_SRCS xcursor/themepage.ui )
29   include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/xcursor/ )
30 else(X11_Xcursor_FOUND)
31   set( libnoinst_SRCS core/themepage.cpp )
32   include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/core/ )
33 endif(X11_Xcursor_FOUND)
37 ########### next target ###############
39 set(kapplymousetheme_SRCS kapplymousetheme.cpp )
42 kde4_add_executable(kapplymousetheme ${kapplymousetheme_SRCS})
44 target_link_libraries(kapplymousetheme 
45 ${KDE4_KDEUI_LIBS} ${X11_Xrender_LIB} ${X11_X11_LIB})
46 if (X11_Xcursor_FOUND)
47    target_link_libraries(kapplymousetheme ${X11_Xcursor_LIB})
48 endif (X11_Xcursor_FOUND)
50 install(TARGETS kapplymousetheme ${INSTALL_TARGETS_DEFAULT_ARGS})
53 ########### next target ###############
55 set(kcm_input_PART_SRCS mouse.cpp main.cpp logitechmouse.cpp ${libnoinst_SRCS})
58 kde4_add_ui_files(kcm_input_PART_SRCS kmousedlg.ui logitechmouse_base.ui )
60 kde4_add_plugin(kcm_input ${kcm_input_PART_SRCS})
63 target_link_libraries(kcm_input ${KDE4_KDE3SUPPORT_LIBS} ${X11_LIBRARIES})
64 if (LIBUSB_FOUND)
65    target_link_libraries(kcm_input ${LIBUSB_LIBRARIES})
66 endif (LIBUSB_FOUND)
67 if (X11_Xcursor_FOUND)
68    target_link_libraries(kcm_input ${X11_Xcursor_LIB})
69 endif (X11_Xcursor_FOUND)
70 if (X11_Xfixes_FOUND)
71    target_link_libraries(kcm_input ${X11_Xfixes_LIB})
72 endif (X11_Xfixes_FOUND)
74 install(TARGETS kcm_input  DESTINATION ${PLUGIN_INSTALL_DIR} )
77 ########### install files ###############
79 install( FILES mouse.desktop  DESTINATION  ${SERVICES_INSTALL_DIR} )
80 install( FILES cursor_large_black.pcf.gz cursor_large_white.pcf.gz cursor_small_white.pcf.gz  DESTINATION  ${DATA_INSTALL_DIR}/kcminput )
81 install( FILES mouse_cursor_theme.upd  DESTINATION  ${KCONF_UPDATE_INSTALL_DIR} )