Merge from 2.2
[platform/framework/native/telephony.git] / CMakeLists.txt
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
2
3 SET (this_target osp-telephony)
4
5 SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output)
6
7 INCLUDE_DIRECTORIES(
8         inc
9         src
10         src/inc
11         /usr/include/chromium
12         /usr/include/glib-2.0
13         /usr/lib/glib-2.0/include
14         /usr/include/telephony
15         /usr/include/telephony-client
16         /usr/include/network
17         /usr/include/osp
18         /usr/include/osp/app
19         /usr/include/osp/base
20         /usr/include/osp/io
21         /usr/include/osp/security
22         /usr/include/osp/system
23         )
24
25 SET (${this_target}_SOURCE_FILES
26         src/FTelCallInfo.cpp
27         src/FTelCallManager.cpp
28         src/FTelNetworkInfo.cpp
29         src/FTelNetworkManager.cpp
30         src/FTelNetworkStatus.cpp
31         src/FTelSimInfo.cpp
32         src/FTelSimStateManager.cpp
33         src/FTel_CallForwardEvent.cpp
34         src/FTel_CallForwardEventArg.cpp
35         src/FTel_CallInfoImpl.cpp
36         src/FTel_CallManagerImpl.cpp
37         src/FTel_CallManagerEvent.cpp
38         src/FTel_CallManagerEventArg.cpp
39         src/FTel_NetworkInfoImpl.cpp
40         src/FTel_NetworkManagerEvent.cpp
41         src/FTel_NetworkManagerEventArg.cpp
42         src/FTel_NetworkManagerImpl.cpp
43         src/FTel_NetworkSettingEvent.cpp
44         src/FTel_NetworkSettingEventArg.cpp
45         src/FTel_NetworkStatusImpl.cpp
46         src/FTel_SimInfoImpl.cpp
47         src/FTel_SimStateManagerImpl.cpp
48         src/FTel_SimEvent.cpp
49         src/FTel_SimEventArg.cpp
50         src/FTel_SimManagerEvent.cpp
51         src/FTel_SimManagerEventArg.cpp
52         src/FTel_TelephonyIpcMessages.cpp
53         src/FTel_TelephonyIpcProxy.cpp
54         src/FTel_TelephonyUtility.cpp
55 )
56
57 SET(EXTRA_CFLAGS  "${EXTRA_CFLAGS} -Wall" )
58
59 ## SET C COMPILER FLAGS
60 SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
61
62 ## SET CPP COMPILER FLAGS
63 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
64 SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
65
66 ## Create Library
67 ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
68
69 ## SET DEPENDENCY FLAGS
70 ADD_DEPENDENCIES(${this_target} chromium osp-appfw)
71
72 ## SET LINKER FLAGS
73 SET(CMAKE_SHARED_LINKER_FLAGS -Wl,--no-undefined)
74
75 TARGET_LINK_LIBRARIES(${this_target} "-lchromium" )
76 TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" )
77 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-telephony-network-info" )
78 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-telephony-sim" )
79 TARGET_LINK_LIBRARIES(${this_target} "-ltapi" )
80 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-network-connection" )
81 TARGET_LINK_LIBRARIES(${this_target} "-lpthread" )
82
83 SET_TARGET_PROPERTIES(${this_target}
84         PROPERTIES
85         VERSION ${FULLVER}
86         SOVERSION ${MAJORVER}
87         CLEAN_DIRECT_OUTPUT 1
88         )
89
90 INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp
91                                 FILES_MATCHING PATTERN "*.so*"
92                                 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
93                                                                                 GROUP_EXECUTE GROUP_READ
94                                                                                 WORLD_EXECUTE WORLD_READ)
95
96 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION include/osp FILES_MATCHING PATTERN "*.h")
97 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/inc/ DESTINATION include/osp/telephony FILES_MATCHING PATTERN "*.h")
98
99 # pkgconfig file
100 CONFIGURE_FILE(${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY)
101 INSTALL(FILES ${CMAKE_SOURCE_DIR}/${this_target}.pc DESTINATION lib/pkgconfig)