Remove legacy codes
[platform/core/connectivity/smartcard-service.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2
3 MESSAGE("build smartcard-service")
4
5 SET(CMAKE_VERBOSE_MAKEFILE OFF)
6
7 # apply smack
8 ADD_DEFINITIONS("-DUSER_SPACE_SMACK")
9
10 IF(DEFINED USE_AUTOSTART)
11         ADD_DEFINITIONS("-DUSE_AUTOSTART")
12 ENDIF()
13
14 SET(GC_SECTIONS_FLAGS "-fdata-sections -ffunction-sections -Wl,--gc-sections")
15 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GC_SECTIONS_FLAGS}")
16 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GC_SECTIONS_FLAGS}")
17
18 FIND_PROGRAM(GDBUS_CODEGEN NAMES gdbus-codegen)
19 EXEC_PROGRAM(${GDBUS_CODEGEN} ARGS
20         " \\
21         --generate-c-code ${CMAKE_CURRENT_SOURCE_DIR}/common/smartcard-service-gdbus \\
22         --c-namespace SmartcardService\\
23         --interface-prefix org.tizen.SmartcardService. \\
24         ${CMAKE_CURRENT_SOURCE_DIR}/common/smartcard-service-gdbus.xml \\
25         ")
26
27 ADD_SUBDIRECTORY(common)
28 ADD_SUBDIRECTORY(client)
29 ADD_SUBDIRECTORY(server)
30
31 IF(DEFINED TEST_CLIENT)
32         ADD_SUBDIRECTORY(test-client)
33 ENDIF()
34