3 pkg_check_modules(pkgs_main REQUIRED
4 glib-2.0 gthread-2.0 elementary
5 appcore-common appcore-efl
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
15 capi-system-system-settings
20 FOREACH(flag ${pkgs_main_CFLAGS})
21 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
24 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
25 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
26 SET(BUILD_ARCH "${ARCH}")
28 IF("${BUILD_ARCH}" STREQUAL "arm")
29 ADD_DEFINITIONS("-DTARGET")
30 MESSAGE("********************** add -DTARGET")
31 ENDIF("${BUILD_ARCH}" STREQUAL "arm")
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")
41 ADD_DEFINITIONS("-fpie")
43 ADD_DEFINITIONS("-DXP_UNIX")
46 ADD_EXECUTABLE(${PROJECT_NAME}
53 ####FOR TEST>>>>########
54 ADD_DEFINITIONS("-DPLUGIN")
56 SET(TEST_PKG_NAME test_server)
58 ADD_EXECUTABLE(${TEST_PKG_NAME}
59 ./plugin-resource/test_server.c
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>>>>########
69 SET(SETTING_CONFUTIL setting_conf_util)
70 ADD_EXECUTABLE(${SETTING_CONFUTIL}
71 ./conf_util/setting_confutil.c
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)
77 ####FOR TEST>>>>########
78 TARGET_LINK_LIBRARIES(${PROJECT_NAME} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common)
81 #TARGET_LINK_LIBRARIES(${PROJECT_NAME} -ldmalloc)
82 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_main_LDFLAGS} "-pie")
84 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION /usr/apps/${SETTING_PKG_NAME}/bin)
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
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
99 ADD_DEPENDENCIES(${PROJECT_NAME} setting-theme.edj)
100 ADD_DEPENDENCIES(${PROJECT_NAME} setting-genlist-theme.edj)
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/)
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)
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 #------------------------------------------------------------------------------------------
118 # install desktop file & icon
119 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
121 INSTALL(FILES ${CMAKE_SOURCE_DIR}/${SETTING_PKG_NAME}.xml DESTINATION /usr/share/packages/)
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")
128 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/resource/media-data-sdk/settings DESTINATION /opt/share PATTERN "*")
131 # INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PROJECT_NAME}.ini DESTINATION share/process-info)