1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
3 SET (this_target osp-social)
5 SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output)
7 #INCLUDE(FindPkgConfig)
8 #pkg_check_modules(pkgs REQUIRED calendar-service2)
9 #pkg_check_modules(pkgs REQUIRED accounts-svc)
17 /usr/lib/glib-2.0/include
20 /usr/include/accounts-svc
21 /usr/include/contacts-svc
25 /usr/include/osp/media
26 /usr/include/osp/security
27 /usr/include/calendar-service2
30 SET (${this_target}_SOURCE_FILES
32 src/FScl_AddressImpl.cpp
33 src/FSclAddressbook.cpp
34 src/FScl_AddressbookImpl.cpp
35 src/FSclAddressbookFilter.cpp
36 src/FScl_AddressbookFilterImpl.cpp
37 src/FScl_AddressbookUtil.cpp
38 src/FSclAddressbookManager.cpp
39 src/FScl_AddressbookManagerImpl.cpp
41 src/FScl_CategoryImpl.cpp
43 src/FScl_ContactImpl.cpp
44 src/FSclContactEvent.cpp
45 src/FScl_ContactEventImpl.cpp
47 src/FScl_EmailImpl.cpp
48 src/FSclEmailContact.cpp
49 src/FScl_EmailContactImpl.cpp
51 src/FScl_ImAddressImpl.cpp
52 src/FSclPhoneNumber.cpp
53 src/FScl_PhoneNumberImpl.cpp
54 src/FSclPhoneNumberContact.cpp
55 src/FScl_PhoneNumberContactImpl.cpp
57 src/FScl_RecordImpl.cpp
60 src/FSclCalendarbook.cpp
61 src/FScl_CalendarbookImpl.cpp
63 src/FScl_ReminderImpl.cpp
65 src/FScl_CalTodoImpl.cpp
67 src/FScl_CalEventImpl.cpp
69 src/FSclRecurrence.cpp
70 src/FScl_RecurrenceImpl.cpp
72 src/FScl_CalendarImpl.cpp
73 src/FSclCalEventInstance.cpp
74 src/FScl_CalEventInstanceImpl.cpp
75 src/FSclCalEventChangeInfo.cpp
76 src/FScl_CalEventChangeInfoImpl.cpp
77 src/FSclCalTodoChangeInfo.cpp
78 src/FScl_CalTodoChangeInfoImpl.cpp
79 src/FSclCalendarbookFilter.cpp
80 src/FScl_CalendarbookFilterImpl.cpp
81 src/FScl_CalendarbookUtil.cpp
82 src/FScl_CalendarbookDbConnector.cpp
83 src/FScl_CalendarbookDbMonitor.cpp
84 src/FScl_CalendarbookDbChangeEvent.cpp
85 src/FScl_CalendarbookDbChangeEventArg.cpp
86 src/FScl_CalendarbookRecordRetrivalEvent.cpp
87 src/FScl_CalendarbookRecordRetrivalEventArg.cpp
88 src/FScl_CalendarbookRecordRetrivalThread.cpp
89 src/FSclContactChangeInfo.cpp
90 src/FScl_ContactChangeInfoImpl.cpp
91 src/FSclCategoryChangeInfo.cpp
92 src/FScl_CategoryChangeInfoImpl.cpp
93 src/FSclOrganization.cpp
94 src/FScl_OrganizationImpl.cpp
96 src/FScl_PersonImpl.cpp
97 src/FSclRelationship.cpp
98 src/FScl_RelationshipImpl.cpp
99 src/FScl_ContactDbConnector.cpp
100 src/FScl_ContactDbMonitor.cpp
101 src/FScl_ContactDbChangeEvent.cpp
102 src/FScl_ContactDbChangeEventArg.cpp
104 src/FScl_AccountImpl.cpp
105 src/FSclAccountAccessor.cpp
106 src/FScl_AccountAccessorImpl.cpp
107 src/FSclAccountManager.cpp
108 src/FScl_AccountManagerImpl.cpp
109 src/FSclAccountProvider.cpp
110 src/FScl_AccountProviderImpl.cpp
111 src/FScl_AccountManagerUtil.cpp
112 src/FScl_AccountDbChangeEvent.cpp
113 src/FScl_AccountDbChangeEventArg.cpp
114 src/FScl_AccountDbConnector.cpp
115 src/FScl_AccountDbMonitor.cpp
116 src/FSclUserProfile.cpp
117 src/FScl_UserProfileImpl.cpp
120 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall" )
122 ## SET C COMPILER FLAGS
123 SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
125 ## SET CPP COMPILER FLAGS
126 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
127 SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
130 ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
133 SET(CMAKE_SHARED_LINKER_FLAGS -Wl,--no-undefined)
135 TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" )
136 TARGET_LINK_LIBRARIES(${this_target} "-losp-image" )
137 TARGET_LINK_LIBRARIES(${this_target} "-losp-uifw" )
138 TARGET_LINK_LIBRARIES(${this_target} "-lglib-2.0" )
139 TARGET_LINK_LIBRARIES(${this_target} "-lcalendar-service2" )
140 TARGET_LINK_LIBRARIES(${this_target} "-lcontacts-service2" )
141 TARGET_LINK_LIBRARIES(${this_target} "-laccounts-svc" )
142 TARGET_LINK_LIBRARIES(${this_target} "-lpthread" )
144 SET_TARGET_PROPERTIES(${this_target}
147 SOVERSION ${MAJORVER}
148 CLEAN_DIRECT_OUTPUT 1
151 ADD_CUSTOM_COMMAND(TARGET ${this_target}
153 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}
154 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}
155 COMMAND ${CMAKE_STRIP} --strip-unneeded ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}
156 COMMENT "strip ${this_target}"
159 INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp
160 FILES_MATCHING PATTERN "*.so*"
161 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
162 GROUP_EXECUTE GROUP_READ
163 WORLD_EXECUTE WORLD_READ)
164 INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/debug/ DESTINATION lib/osp/debug
165 FILES_MATCHING PATTERN "*.so*"
166 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
167 GROUP_EXECUTE GROUP_READ
168 WORLD_EXECUTE WORLD_READ)
170 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION include/osp FILES_MATCHING PATTERN "*.h")
171 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/inc/ DESTINATION include/osp/social FILES_MATCHING PATTERN "*.h")
174 CONFIGURE_FILE(${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY)
175 INSTALL(FILES ${CMAKE_SOURCE_DIR}/${this_target}.pc DESTINATION lib/pkgconfig)
177 # INCLUDE FOR BUILD & INSTALL PACKAGE MANAGER .SO
178 ADD_SUBDIRECTORY(pkgmgr_account)