Remove gcov rpm package
[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 # make string from entire content of byte array
8 ADD_DEFINITIONS("-DTO_STRING_ALL")
9 ADD_DEFINITIONS("-DUSE_CYNARA")
10
11 SET(GC_SECTIONS_FLAGS "-fdata-sections -ffunction-sections -Wl,--gc-sections")
12 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GC_SECTIONS_FLAGS}")
13 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GC_SECTIONS_FLAGS}")
14
15 FIND_PROGRAM(GDBUS_CODEGEN NAMES gdbus-codegen)
16 EXEC_PROGRAM(${GDBUS_CODEGEN} ARGS
17         " \\
18         --generate-c-code ${CMAKE_CURRENT_SOURCE_DIR}/common/smartcard-service-gdbus \\
19         --c-namespace SmartcardService\\
20         --interface-prefix org.tizen.SmartcardService. \\
21         ${CMAKE_CURRENT_SOURCE_DIR}/common/smartcard-service-gdbus.xml \\
22         ")
23
24 SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/common/smartcard-service-gdbus.c PROPERTIES GENERATED TRUE)
25
26 ADD_SUBDIRECTORY(common)
27 IF(BUILD_GCOV)
28         ADD_DEFINITIONS(-DBUILD_GCOV)
29 ENDIF(BUILD_GCOV)
30
31 ADD_SUBDIRECTORY(server)
32 IF(BUILD_GTESTS)
33         ADD_SUBDIRECTORY(gtest)
34         ADD_DEFINITIONS(-DBUILD_GTEST)
35 ENDIF(BUILD_GTESTS)