fa6d5f2e7252d978ec5fcef3c35c972d529ceab7
[apps/core/preloaded/settings.git] / setting-phone / CMakeLists.txt
1 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
2 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include)
3
4
5 INCLUDE(FindPkgConfig)
6 pkg_check_modules(pkgs_phone REQUIRED evas eina ecore elementary appcore-common vconf appcore-efl haptic tapi ui-gadget-1 capi-appfw-application appsvc libxml-2.0)
7
8 FOREACH(flag ${pkgs_phone_CFLAGS})
9         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
10 ENDFOREACH(flag)
11
12 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC")
13 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
14
15 IF("${ARCH}" STREQUAL "arm")
16         ADD_DEFINITIONS("-DTARGET")
17         MESSAGE("add -DTARGET")
18 ENDIF("${ARCH}" STREQUAL "arm")
19
20 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
21 ADD_DEFINITIONS("-DSLP_DEBUG")
22 ADD_DEFINITIONS("-fpie")
23
24 #SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
25
26 ADD_LIBRARY(${SETTING_PHONE_UG} SHARED
27         ./src/setting-phone.c
28         ./src/setting-phone-language-region.c
29         ./src/setting-phone-display-language.c
30         ./src/setting-phone-region-format.c
31         )
32
33 TARGET_LINK_LIBRARIES(${SETTING_PHONE_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON}
34 -lsetting-common -licui18n -licudata -licuuc)
35 TARGET_LINK_LIBRARIES(${SETTING_PHONE_UG} ${pkgs_phone_LDFLAGS})
36
37 INSTALL(TARGETS ${SETTING_PHONE_UG} DESTINATION /usr/ug/lib)