Merge "packaging: spec cleanup" into tizen
[apps/core/preloaded/settings.git] / setting-about / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2
3 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
4 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include)
5
6 INCLUDE(FindPkgConfig)
7 pkg_check_modules(pkgs_about REQUIRED
8         elementary appcore-common appcore-efl
9         ui-gadget-1
10         capi-appfw-application capi-appfw-app-manager evas ecore
11         tapi bluetooth-api json-glib-1.0 capi-system-info capi-system-system-settings capi-network-bluetooth capi-network-wifi)
12
13 FOREACH(flag ${pkgs_about_CFLAGS})
14         SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
15 ENDFOREACH(flag)
16
17 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC")
18 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
19
20 IF("${ARCH}" STREQUAL "arm")
21         ADD_DEFINITIONS("-DTARGET")
22         MESSAGE("add -DTARGET")
23 ENDIF("${ARCH}" STREQUAL "arm")
24
25 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
26 ADD_DEFINITIONS("-DSLP_DEBUG")
27
28 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
29
30 ADD_LIBRARY(${SETTING_ABOUT_UG} SHARED
31         src/setting-about.c
32         src/setting-about-main.c
33 )
34
35 TARGET_LINK_LIBRARIES(${SETTING_ABOUT_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON}/ -lsetting-common)
36 TARGET_LINK_LIBRARIES(${SETTING_ABOUT_UG} ${pkgs_about_LDFLAGS})
37
38 INSTALL(TARGETS ${SETTING_ABOUT_UG} DESTINATION /usr/ug/lib)