summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: fa1948d4f8136aae5efc6545679c885aee33bae2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

SET(CMAKE_INSTALL_PREFIX /usr)
SET(PREFIX ${CMAKE_INSTALL_PREFIX})

SET (this_target osp-social)

SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output)

#INCLUDE(FindPkgConfig)
#pkg_check_modules(pkgs REQUIRED calendar-service2)
#pkg_check_modules(pkgs REQUIRED accounts-svc)

INCLUDE_DIRECTORIES(
	inc
	src
	src/inc
	/usr/include
	/usr/include/glib-2.0
	/usr/lib/glib-2.0/include
	/usr/include/db-util
	/usr/include/social
	/usr/include/accounts-svc
	/usr/include/contacts-svc
	/usr/include/osp
	/usr/include/osp/app
	/usr/include/osp/base
	/usr/include/osp/media
	/usr/include/osp/io
	/usr/include/osp/security
	/usr/include/calendar-service2
	)

SET (${this_target}_SOURCE_FILES
	src/FSclAddress.cpp
	src/FScl_AddressImpl.cpp
	src/FSclAddressbook.cpp
	src/FScl_AddressbookImpl.cpp
	src/FSclAddressbookFilter.cpp
	src/FScl_AddressbookFilterImpl.cpp
	src/FScl_AddressbookUtil.cpp
	src/FSclAddressbookManager.cpp
	src/FScl_AddressbookManagerImpl.cpp
	src/FSclCategory.cpp
	src/FScl_CategoryImpl.cpp
	src/FSclContact.cpp
	src/FScl_ContactImpl.cpp
	src/FSclContactAppLaunchData.cpp
	src/FScl_ContactAppLaunchDataImpl.cpp
	src/FSclContactEvent.cpp
	src/FScl_ContactEventImpl.cpp
	src/FSclEmail.cpp
	src/FScl_EmailImpl.cpp
	src/FSclEmailContact.cpp
	src/FScl_EmailContactImpl.cpp
	src/FSclImAddress.cpp
	src/FScl_ImAddressImpl.cpp
	src/FSclPhoneNumber.cpp
	src/FScl_PhoneNumberImpl.cpp
	src/FSclPhoneNumberContact.cpp
	src/FScl_PhoneNumberContactImpl.cpp
	src/FSclRecord.cpp
	src/FScl_RecordImpl.cpp
	src/FSclUrl.cpp
	src/FScl_UrlImpl.cpp
	src/FSclCalendarbook.cpp
	src/FScl_CalendarbookImpl.cpp
	src/FSclReminder.cpp
	src/FScl_ReminderImpl.cpp
	src/FSclCalTodo.cpp
	src/FScl_CalTodoImpl.cpp
	src/FSclCalEvent.cpp
	src/FScl_CalEventImpl.cpp
	src/FSclAttendee.cpp
	src/FSclRecurrence.cpp
	src/FScl_RecurrenceImpl.cpp
	src/FSclCalendar.cpp
	src/FScl_CalendarImpl.cpp
	src/FSclCalEventInstance.cpp
	src/FScl_CalEventInstanceImpl.cpp
	src/FSclCalEventChangeInfo.cpp
	src/FScl_CalEventChangeInfoImpl.cpp
	src/FSclCalTodoChangeInfo.cpp
	src/FScl_CalTodoChangeInfoImpl.cpp
	src/FSclCalendarbookFilter.cpp
	src/FScl_CalendarbookFilterImpl.cpp
	src/FScl_CalendarbookUtil.cpp
	src/FScl_CalendarbookDbConnector.cpp
	src/FScl_CalendarbookDbMonitor.cpp
	src/FScl_CalendarbookDbChangeEvent.cpp
	src/FScl_CalendarbookDbChangeEventArg.cpp
	src/FScl_CalendarbookRecordRetrivalEvent.cpp
	src/FScl_CalendarbookRecordRetrivalEventArg.cpp
	src/FScl_CalendarbookRecordRetrivalThread.cpp
	src/FSclContactChangeInfo.cpp
	src/FScl_ContactChangeInfoImpl.cpp
	src/FSclCategoryChangeInfo.cpp
	src/FScl_CategoryChangeInfoImpl.cpp
	src/FSclOrganization.cpp
	src/FScl_OrganizationImpl.cpp
	src/FSclPerson.cpp
	src/FScl_PersonImpl.cpp
	src/FSclRelationship.cpp
	src/FScl_RelationshipImpl.cpp
	src/FScl_ContactDbConnector.cpp
	src/FScl_ContactDbMonitor.cpp
	src/FScl_ContactDbChangeEvent.cpp
	src/FScl_ContactDbChangeEventArg.cpp
	src/FSclAccount.cpp
	src/FScl_AccountImpl.cpp
	src/FSclAccountAccessor.cpp
	src/FScl_AccountAccessorImpl.cpp
	src/FSclAccountManager.cpp
	src/FScl_AccountManagerImpl.cpp
	src/FSclAccountProvider.cpp
	src/FScl_AccountProviderImpl.cpp
	src/FScl_AccountManagerUtil.cpp
	src/FScl_AccountDbChangeEvent.cpp
	src/FScl_AccountDbChangeEventArg.cpp
	src/FScl_AccountDbConnector.cpp
	src/FScl_AccountDbMonitor.cpp
	src/FSclUserProfile.cpp
	src/FScl_UserProfileImpl.cpp
)

SET(EXTRA_CFLAGS  "${EXTRA_CFLAGS} -Wall" )

## SET C COMPILER FLAGS
SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")

## SET CPP COMPILER FLAGS
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")

## Create Library
ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})

## SET LINKER FLAGS
SET(CMAKE_SHARED_LINKER_FLAGS -Wl,--no-undefined)

TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" )
TARGET_LINK_LIBRARIES(${this_target} "-losp-image" )
TARGET_LINK_LIBRARIES(${this_target} "-losp-uifw" )
TARGET_LINK_LIBRARIES(${this_target} "-lglib-2.0" )
TARGET_LINK_LIBRARIES(${this_target} "-lcalendar-service2" )
TARGET_LINK_LIBRARIES(${this_target} "-lcontacts-service2" )
TARGET_LINK_LIBRARIES(${this_target} "-laccounts-svc" )
TARGET_LINK_LIBRARIES(${this_target} "-lpthread" )

SET_TARGET_PROPERTIES(${this_target}
	PROPERTIES
	VERSION ${FULLVER}
	SOVERSION ${MAJORVER}
	CLEAN_DIRECT_OUTPUT 1
	)

INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp
				FILES_MATCHING PATTERN "*.so*"
				PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
										GROUP_EXECUTE GROUP_READ
										WORLD_EXECUTE WORLD_READ)

INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION include/osp FILES_MATCHING PATTERN "*.h")
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/inc/ DESTINATION include/osp/social FILES_MATCHING PATTERN "*.h")

SET(PC_NAME ${this_target})
SET(PC_REQUIRED ${pc_requires})
SET(PC_LDFLAGS -l${this_target})

# pkgconfig file
CONFIGURE_FILE(${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/${this_target}.pc DESTINATION lib/pkgconfig)

# INCLUDE FOR BUILD & INSTALL PACKAGE MANAGER .SO
ADD_SUBDIRECTORY(pkgmgr_account)