Tizen 2.1 base
[apps/core/preloaded/settings.git] / setting-font / 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_font REQUIRED ecore ecore-file evas elementary appcore-common appcore-efl ui-gadget-1 capi-appfw-application
7 sysman fontconfig libxml-2.0 capi-system-system-settings)
8
9 FOREACH(flag ${pkgs_font_CFLAGS})
10         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
11 ENDFOREACH(flag)
12
13 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC")
14 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
15
16 IF("${ARCH}" STREQUAL "arm")
17         ADD_DEFINITIONS("-DTARGET")
18         MESSAGE("add -DTARGET")
19 ENDIF("${ARCH}" STREQUAL "arm")
20
21 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
22 ADD_DEFINITIONS("-DSLP_DEBUG")
23 ADD_DEFINITIONS("-fpie")
24
25 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
26
27 ADD_LIBRARY(${SETTING_FONT_UG} SHARED
28         ./src/setting-font.c
29         ./src/setting-font-main.c
30         ./src/setting-font-font-size.c
31         )
32
33 TARGET_LINK_LIBRARIES(${SETTING_FONT_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common)
34 TARGET_LINK_LIBRARIES(${SETTING_FONT_UG} ${pkgs_font_LDFLAGS})
35
36 INSTALL(TARGETS ${SETTING_FONT_UG} DESTINATION /usr/ug/lib)