new release for RSA
[apps/core/preloaded/settings.git] / setting-reset / 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_reset REQUIRED evas ecore elementary appcore-common appcore-efl tapi json-glib-1.0 ui-gadget-1 capi-appfw-application mm-sound dlog heynoti )
7
8 FOREACH(flag ${pkgs_reset_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
23 SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
24
25 ADD_LIBRARY(${SETTING_RESET_UG} SHARED
26         ./src/setting-reset.c
27         ./src/setting-reset-main.c
28         ./src/setting-reset-settings.c)
29
30 TARGET_LINK_LIBRARIES(${SETTING_RESET_UG} -L${CMAKE_BINARY_DIR}/${SETTING_COMMON} -lsetting-common)
31 TARGET_LINK_LIBRARIES(${SETTING_RESET_UG} ${pkgs_reset_LDFLAGS})
32
33 INSTALL(TARGETS ${SETTING_RESET_UG} DESTINATION /opt/ug/lib)