1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
3 SET(CMAKE_INSTALL_PREFIX /usr)
4 SET(PREFIX ${CMAKE_INSTALL_PREFIX})
6 SET (this_target osp-social)
8 SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output)
10 #INCLUDE(FindPkgConfig)
11 #pkg_check_modules(pkgs REQUIRED calendar-service2)
12 #pkg_check_modules(pkgs REQUIRED accounts-svc)
20 /usr/lib/glib-2.0/include
23 /usr/include/accounts-svc
24 /usr/include/contacts-svc
28 /usr/include/osp/media
29 /usr/include/osp/security
30 /usr/include/calendar-service2
33 SET (${this_target}_SOURCE_FILES
35 src/FScl_AddressImpl.cpp
36 src/FSclAddressbook.cpp
37 src/FScl_AddressbookImpl.cpp
38 src/FSclAddressbookFilter.cpp
39 src/FScl_AddressbookFilterImpl.cpp
40 src/FScl_AddressbookUtil.cpp
41 src/FSclAddressbookManager.cpp
42 src/FScl_AddressbookManagerImpl.cpp
44 src/FScl_CategoryImpl.cpp
46 src/FScl_ContactImpl.cpp
47 src/FSclContactEvent.cpp
48 src/FScl_ContactEventImpl.cpp
50 src/FScl_EmailImpl.cpp
51 src/FSclEmailContact.cpp
52 src/FScl_EmailContactImpl.cpp
54 src/FScl_ImAddressImpl.cpp
55 src/FSclPhoneNumber.cpp
56 src/FScl_PhoneNumberImpl.cpp
57 src/FSclPhoneNumberContact.cpp
58 src/FScl_PhoneNumberContactImpl.cpp
60 src/FScl_RecordImpl.cpp
63 src/FSclCalendarbook.cpp
64 src/FScl_CalendarbookImpl.cpp
66 src/FScl_ReminderImpl.cpp
68 src/FScl_CalTodoImpl.cpp
70 src/FScl_CalEventImpl.cpp
72 src/FSclRecurrence.cpp
73 src/FScl_RecurrenceImpl.cpp
75 src/FScl_CalendarImpl.cpp
76 src/FSclCalEventInstance.cpp
77 src/FScl_CalEventInstanceImpl.cpp
78 src/FSclCalEventChangeInfo.cpp
79 src/FScl_CalEventChangeInfoImpl.cpp
80 src/FSclCalTodoChangeInfo.cpp
81 src/FScl_CalTodoChangeInfoImpl.cpp
82 src/FSclCalendarbookFilter.cpp
83 src/FScl_CalendarbookFilterImpl.cpp
84 src/FScl_CalendarbookUtil.cpp
85 src/FScl_CalendarbookDbConnector.cpp
86 src/FScl_CalendarbookDbMonitor.cpp
87 src/FScl_CalendarbookDbChangeEvent.cpp
88 src/FScl_CalendarbookDbChangeEventArg.cpp
89 src/FScl_CalendarbookRecordRetrivalEvent.cpp
90 src/FScl_CalendarbookRecordRetrivalEventArg.cpp
91 src/FScl_CalendarbookRecordRetrivalThread.cpp
92 src/FSclContactChangeInfo.cpp
93 src/FScl_ContactChangeInfoImpl.cpp
94 src/FSclCategoryChangeInfo.cpp
95 src/FScl_CategoryChangeInfoImpl.cpp
96 src/FSclOrganization.cpp
97 src/FScl_OrganizationImpl.cpp
99 src/FScl_PersonImpl.cpp
100 src/FSclRelationship.cpp
101 src/FScl_RelationshipImpl.cpp
102 src/FScl_ContactDbConnector.cpp
103 src/FScl_ContactDbMonitor.cpp
104 src/FScl_ContactDbChangeEvent.cpp
105 src/FScl_ContactDbChangeEventArg.cpp
107 src/FScl_AccountImpl.cpp
108 src/FSclAccountAccessor.cpp
109 src/FScl_AccountAccessorImpl.cpp
110 src/FSclAccountManager.cpp
111 src/FScl_AccountManagerImpl.cpp
112 src/FSclAccountProvider.cpp
113 src/FScl_AccountProviderImpl.cpp
114 src/FScl_AccountManagerUtil.cpp
115 src/FScl_AccountDbChangeEvent.cpp
116 src/FScl_AccountDbChangeEventArg.cpp
117 src/FScl_AccountDbConnector.cpp
118 src/FScl_AccountDbMonitor.cpp
119 src/FSclUserProfile.cpp
120 src/FScl_UserProfileImpl.cpp
123 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall" )
125 ## SET C COMPILER FLAGS
126 SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
128 ## SET CPP COMPILER FLAGS
129 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
130 SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
133 ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
136 SET(CMAKE_SHARED_LINKER_FLAGS -Wl,--no-undefined)
138 TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" )
139 TARGET_LINK_LIBRARIES(${this_target} "-losp-image" )
140 TARGET_LINK_LIBRARIES(${this_target} "-losp-uifw" )
141 TARGET_LINK_LIBRARIES(${this_target} "-lglib-2.0" )
142 TARGET_LINK_LIBRARIES(${this_target} "-lcalendar-service2" )
143 TARGET_LINK_LIBRARIES(${this_target} "-lcontacts-service2" )
144 TARGET_LINK_LIBRARIES(${this_target} "-laccounts-svc" )
145 TARGET_LINK_LIBRARIES(${this_target} "-lpthread" )
147 SET_TARGET_PROPERTIES(${this_target}
150 SOVERSION ${MAJORVER}
151 CLEAN_DIRECT_OUTPUT 1
154 ADD_CUSTOM_COMMAND(TARGET ${this_target}
156 COMMAND ${CMAKE_COMMAND} -E copy ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER}
157 COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${MAJORVER}
158 COMMAND ${CMAKE_STRIP} --strip-unneeded ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}
159 COMMENT "strip ${this_target}"
162 INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp
163 FILES_MATCHING PATTERN "*.so*"
164 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
165 GROUP_EXECUTE GROUP_READ
166 WORLD_EXECUTE WORLD_READ)
167 INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/debug/ DESTINATION lib/osp/debug
168 FILES_MATCHING PATTERN "*.so*"
169 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
170 GROUP_EXECUTE GROUP_READ
171 WORLD_EXECUTE WORLD_READ)
173 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION include/osp FILES_MATCHING PATTERN "*.h")
174 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/inc/ DESTINATION include/osp/social FILES_MATCHING PATTERN "*.h")
176 SET(PC_NAME ${this_target})
177 SET(PC_REQUIRED ${pc_requires})
178 SET(PC_LDFLAGS -l${this_target})
181 CONFIGURE_FILE(${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY)
182 INSTALL(FILES ${CMAKE_SOURCE_DIR}/${this_target}.pc DESTINATION lib/pkgconfig)
184 # INCLUDE FOR BUILD & INSTALL PACKAGE MANAGER .SO
185 ADD_SUBDIRECTORY(pkgmgr_account)