2 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
3 SET(fw_name "capi-system-system-settings")
4 SET(unit_test "system-setting-unittest")
6 SET(requires "dlog vconf fontconfig libxml-2.0 pkgmgr pkgmgr-info alarm-service capi-media-metadata-extractor aul json-glib-1.0 capi-appfw-app-manager capi-appfw-package-manager capi-system-info glib-2.0")
10 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
12 INCLUDE(FindPkgConfig)
13 pkg_check_modules(${fw_name} REQUIRED ${requires})
14 FOREACH(flag ${${fw_name}_CFLAGS})
15 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
18 INCLUDE(FindPkgConfig)
19 pkg_check_modules(${unit_test} REQUIRED ${requires})
20 FOREACH(flag ${${unit_test}_CFLAGS})
21 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
24 SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
26 ADD_DEFINITIONS("-DN_THREADS=${N_THREADS}")
27 ADD_EXECUTABLE(${unit_test} src/unit_test.c
30 TARGET_LINK_LIBRARIES(${unit_test} ${fw_name} "-ldl")
31 INSTALL(TARGETS ${unit_test} DESTINATION /usr/local/bin)