1 INCLUDE_DIRECTORIES(include)
3 SET(NFC_COMMON "nfc-common")
5 FIND_PROGRAM(GDBUS_CODEGEN NAMES gdbus-codegen)
6 EXEC_PROGRAM(${GDBUS_CODEGEN} ARGS
7 " --generate-c-code ${CMAKE_CURRENT_SOURCE_DIR}/net_nfc_gdbus"
8 " --c-namespace NetNfcGDbus"
9 " --interface-prefix org.tizen.NetNfcService."
10 " ${CMAKE_CURRENT_SOURCE_DIR}/net_nfc.xml"
13 AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} COMMON_SRCS)
15 pkg_check_modules(common_pkgs REQUIRED glib-2.0 gio-2.0 gio-unix-2.0 dlog vconf
16 libssl libtzplatform-config capi-network-bluetooth)
18 FOREACH(flag ${common_pkgs_CFLAGS})
19 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
21 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
23 ADD_LIBRARY(${NFC_COMMON} STATIC ${COMMON_SRCS})
24 TARGET_LINK_LIBRARIES(${NFC_COMMON} ${common_pkgs_LDFLAGS})
26 FILE(GLOB COMMON_HEADER include/*.h)
28 CONFIGURE_FILE(${NFC_COMMON}.pc.in ${NFC_COMMON}.pc @ONLY)
29 INSTALL(FILES ${NFC_COMMON}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
31 FOREACH(hfile ${COMMON_HEADER})
32 INSTALL(FILES ${hfile} DESTINATION include/${NFC_COMMON})