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)