Make it translatable
[chakra:rcconf-settings.git] / CMakeLists.txt
1 project(rcconf_settings)
2 cmake_minimum_required(VERSION 2.6)
3 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
4 find_package(Qt4 REQUIRED)
5 find_package(KDE4 REQUIRED)
6 find_package(MSGFMT REQUIRED)
7 include (KDE4Defaults)
8
9 include_directories(  
10     ${CMAKE_SOURCE_DIR} 
11     ${CMAKE_SOURCE_DIR}/src 
12     ${CMAKE_SOURCE_DIR}/data
13     ${CMAKE_BINARY_DIR}  
14     ${rcconf_settings_BINARY_DIR}
15     ${KDE4_INCLUDES} 
16     ${QT_INCLUDES} 
17     ${CMAKE_SOURCE_DIR}/translations
18 )
19 # include_directories(${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
20
21 # Con esto cargo un archivo con variables de cmake :D
22 configure_file( 
23     "${rcconf_settings_SOURCE_DIR}/config.h.in" 
24     "${rcconf_settings_BINARY_DIR}/config.h"
25 )
26
27 # KAuth
28 add_subdirectory(src/helper)
29
30 #Todo el core de la aplicacion
31 set(
32     rcconf_settings_CORE
33     src/core/module.cpp 
34     src/core/daemon.cpp 
35     src/core/settings.cpp 
36     src/core/main.cpp
37 )
38
39 # Widgets de la aplicacion
40 set(
41     rcconf_settings_GUI
42     src/gui/networkinggui.cpp
43     src/gui/localizationgui.cpp 
44     src/gui/daemongui.cpp
45     src/gui/hardwaregui.cpp 
46     src/gui/kcmmodulo.cpp
47 )
48
49 # UIs 
50 set(
51     rcconf_settings_UIS 
52     ui/daemon.ui
53     ui/hardware.ui
54     ui/localization.ui
55     ui/networking.ui
56     ui/main.ui
57 )
58
59 set(
60     rcconf_settings_SRCS
61     ${rcconf_settings_CORE}
62     ${rcconf_settings_GUI}
63 )
64
65
66 kde4_add_ui_files(rcconf_settings_SRCS ${rcconf_settings_UIS})
67 kde4_add_plugin(kcm_rcconf_settings ${rcconf_settings_SRCS})
68 # # Registramos el action para pedir autorizacion para la accion
69
70 # kde4_install_auth_actions(org.kde.kcontrol.rcf data/rcf.actions)
71 # qt4_automoc(${rcconf_settings_SRCS})
72 # add_executable(rcconf_settings ${rcconf_settings_SRCS})
73
74 target_link_libraries(kcm_rcconf_settings ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS})
75
76 install(TARGETS kcm_rcconf_settings DESTINATION ${PLUGIN_INSTALL_DIR})
77 install(FILES data/timezones DESTINATION ${KDE4_DATA_INSTALL_DIR}/rcconf_settings)
78 install(FILES data/rcconf_settings.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR})