removed heynoti dep
[apps/home/settings.git] / src / CMakeLists.txt
1
2 INCLUDE(FindPkgConfig)
3 pkg_check_modules(pkgs_main REQUIRED
4                                           glib-2.0 gthread-2.0 elementary
5                                           appcore-common appcore-efl
6                                           tapi
7                                           utilX
8                                           dlog json-glib-1.0
9                                           ui-gadget-1
10                                           capi-appfw-application aul
11                                           ecore-imf ecore-x eina capi-system-sensor
12                                           ecore ecore-file ecore-input
13                                           sysman icu-i18n icu-io icu-le icu-lx icu-uc
14                                           appsvc libxml-2.0
15                                           capi-system-system-settings
16                                           dbus-glib-1
17                                           ##setting-service
18                                   )
19
20 FOREACH(flag ${pkgs_main_CFLAGS})
21         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
22 ENDFOREACH(flag)
23
24 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
25 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
26 SET(BUILD_ARCH "${ARCH}")
27
28 IF("${BUILD_ARCH}" STREQUAL "arm")
29         ADD_DEFINITIONS("-DTARGET")
30         MESSAGE("********************** add -DTARGET")
31 ENDIF("${BUILD_ARCH}" STREQUAL "arm")
32
33 ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
34 ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
35 ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
36 ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
37 ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
38 ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"")
39 ADD_DEFINITIONS("-DSLP_DEBUG")
40
41 ADD_DEFINITIONS("-fpie")
42
43 ADD_DEFINITIONS("-DXP_UNIX")
44
45
46 ADD_EXECUTABLE(${PROJECT_NAME}
47         ./setting.c
48         ./setting-main.c
49         ./setting-more-menu.c
50         ./setting-plugin.c
51         )
52
53 ####FOR TEST>>>>########
54  ADD_DEFINITIONS("-DPLUGIN")
55 # test server
56 SET(TEST_PKG_NAME test_server)
57
58 ADD_EXECUTABLE(${TEST_PKG_NAME}
59         ./plugin-resource/test_server.c
60         )
61 TARGET_LINK_LIBRARIES(${TEST_PKG_NAME} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common)
62 TARGET_LINK_LIBRARIES(${TEST_PKG_NAME} ${pkgs_main_LDFLAGS} "-pie")
63 INSTALL(TARGETS ${TEST_PKG_NAME} DESTINATION /usr/apps/${SETTING_PKG_NAME}/bin)
64 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/plugin-resource/plugin-cfg DESTINATION /opt/data/setting FILES_MATCHING PATTERN "*.cfg")
65 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/plugin-resource/plugin-xml DESTINATION /opt/data/setting FILES_MATCHING PATTERN "*.xml")
66 ####FOR TEST>>>>########
67
68 # conf_tool
69 SET(SETTING_CONFUTIL setting_conf_util)
70 ADD_EXECUTABLE(${SETTING_CONFUTIL}
71         ./conf_util/setting_confutil.c
72         )
73 TARGET_LINK_LIBRARIES(${SETTING_CONFUTIL} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common)
74 TARGET_LINK_LIBRARIES(${SETTING_CONFUTIL} ${pkgs_main_LDFLAGS} "-pie")
75 INSTALL(TARGETS ${SETTING_CONFUTIL} DESTINATION /usr/apps/${SETTING_PKG_NAME}/bin)
76
77 ####FOR TEST>>>>########
78 TARGET_LINK_LIBRARIES(${PROJECT_NAME} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common)
79
80 # dmalloc
81 #TARGET_LINK_LIBRARIES(${PROJECT_NAME} -ldmalloc)
82 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_main_LDFLAGS} "-pie")
83
84 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/${SETTING_PKG_NAME}/bin)
85
86 # make setting-theme.edj
87 ADD_CUSTOM_TARGET(setting-theme.edj
88                 COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/resource/images
89                 ${CMAKE_SOURCE_DIR}/resource/setting-theme.edc ${CMAKE_BINARY_DIR}/setting-theme.edj
90                 DEPENDS ${CMAKE_SOURCE_DIR}/resource/setting-theme.edc
91 )
92 ADD_CUSTOM_TARGET(setting-genlist-theme.edj
93                 COMMAND edje_cc -id ${CMAKE_SOURCE_DIR}/resource/icons
94                 ${CMAKE_SOURCE_DIR}/resource/setting-genlist-theme.edc
95                 ${CMAKE_BINARY_DIR}/setting-genlist-theme.edj
96                 DEPENDS ${CMAKE_SOURCE_DIR}/resource/setting-genlist-theme.edc
97 )
98
99 ADD_DEPENDENCIES(${PROJECT_NAME} setting-theme.edj)
100 ADD_DEPENDENCIES(${PROJECT_NAME} setting-genlist-theme.edj)
101
102 INSTALL(FILES ${CMAKE_BINARY_DIR}/setting-theme.edj DESTINATION /usr/apps/${SETTING_PKG_NAME}/res/edje/)
103 INSTALL(FILES ${CMAKE_BINARY_DIR}/setting-genlist-theme.edj DESTINATION /usr/apps/${SETTING_PKG_NAME}/res/edje/)
104
105 # install open source license
106 INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/Open_Source_Announcement.html DESTINATION /usr/apps/${SETTING_PKG_NAME}/data)
107 INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/ug-setting-accessibility-efl.xml DESTINATION /usr/share/packages)
108 #INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/ug-setting-font-efl.xml DESTINATION /opt/share/packages)
109
110
111
112
113 #------------------------------------------------------------------------------------------
114 INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/setting.cfg DESTINATION /opt/data/setting)
115 INSTALL(FILES ${CMAKE_SOURCE_DIR}/resource/langlist.xml DESTINATION /opt/data/setting)
116 #------------------------------------------------------------------------------------------
117
118 # install desktop file & icon
119 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
120
121 INSTALL(FILES ${CMAKE_SOURCE_DIR}/${SETTING_PKG_NAME}.xml DESTINATION /usr/share/packages/)
122
123 INSTALL(FILES ${CMAKE_SOURCE_DIR}/${SETTING_PKG_NAME}.png DESTINATION /usr/share/icons/default/small)
124 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/icons DESTINATION /usr/apps/${SETTING_PKG_NAME}/res FILES_MATCHING PATTERN "*.png")
125 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/images DESTINATION /usr/apps/${SETTING_PKG_NAME}/res FILES_MATCHING PATTERN "*.png")
126
127 # install media-data
128 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/media-data-sdk/settings DESTINATION /opt/share PATTERN "*")
129
130 # install ini file
131 # INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.ini DESTINATION share/process-info)
132 #add sub directory
133 ADD_SUBDIRECTORY(po)
134
135
136