1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
3 MESSAGE("build smartcard-service")
5 SET(CMAKE_VERBOSE_MAKEFILE OFF)
8 ADD_DEFINITIONS("-DUSER_SPACE_SMACK")
10 IF(DEFINED USE_AUTOSTART)
11 ADD_DEFINITIONS("-DUSE_AUTOSTART")
14 # make string from entire content of byte array
15 ADD_DEFINITIONS("-DTO_STRING_ALL")
17 SET(GC_SECTIONS_FLAGS "-fdata-sections -ffunction-sections -Wl,--gc-sections")
18 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GC_SECTIONS_FLAGS}")
19 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GC_SECTIONS_FLAGS}")
21 FIND_PROGRAM(GDBUS_CODEGEN NAMES gdbus-codegen)
22 EXEC_PROGRAM(${GDBUS_CODEGEN} ARGS
24 --generate-c-code ${CMAKE_CURRENT_SOURCE_DIR}/common/smartcard-service-gdbus \\
25 --c-namespace SmartcardService\\
26 --interface-prefix org.tizen.SmartcardService. \\
27 ${CMAKE_CURRENT_SOURCE_DIR}/common/smartcard-service-gdbus.xml \\
30 ADD_SUBDIRECTORY(common)
31 ADD_SUBDIRECTORY(client)
32 ADD_SUBDIRECTORY(server)
34 IF(DEFINED TEST_CLIENT)
35 ADD_SUBDIRECTORY(test-client)