1 CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
3 SET (this_target osp-content)
5 SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output)
7 SET(pc_requires "osp-appfw osp-uifw osp-image osp-media osp-net chromium glib-2.0 aul capi-content-media-content capi-media-metadata-extractor capi-content-mime-type")
10 pkg_check_modules(pkgs REQUIRED ${pc_requires})
11 FOREACH(flag ${pkgs_CFLAGS})
12 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
22 /usr/include/osp/media
23 /usr/include/osp/graphics
25 /usr/include/osp/system
27 /usr/include/osp/security
31 SET (${this_target}_SOURCE_FILES
32 src/FCnt_AudioMetadataImpl.cpp
33 src/FCnt_ContentManagerImpl.cpp
34 src/FCnt_ContentManagerUtilImpl.cpp
35 src/FCnt_ContentUtility.cpp
36 src/FCnt_ContentSearchImpl.cpp
37 src/FCnt_ContentDirectoryImpl.cpp
38 src/FCnt_PlayListImpl.cpp
39 src/FCnt_PlayListManagerImpl.cpp
40 src/FCnt_ContentTransferImpl.cpp
41 src/FCnt_ImageMetadataImpl.cpp
42 src/FCnt_VideoMetadataImpl.cpp
43 src/FCnt_ContentTransferEvent.cpp
44 src/FCnt_ContentDownloadHandler.cpp
45 src/FCnt_ContentDownloadListener.cpp
46 src/FCnt_ContentDownloadUserData.cpp
47 src/FCnt_DownloadManagerImpl.cpp
48 src/FCnt_DownloadRequestImpl.cpp
49 src/FCnt_ContentInfoImpl.cpp
50 src/FCnt_ImageContentInfoImpl.cpp
51 src/FCnt_AudioContentInfoImpl.cpp
52 src/FCnt_VideoContentInfoImpl.cpp
53 src/FCnt_OtherContentInfoImpl.cpp
54 src/FCnt_ContentInfoHelper.cpp
55 src/FCntAudioContentInfo.cpp
56 src/FCntAudioMetadata.cpp
57 src/FCntContentInfo.cpp
58 src/FCntContentManager.cpp
59 src/FCntContentManagerUtil.cpp
60 src/FCntContentSearch.cpp
61 src/FCntContentDirectory.cpp
63 src/FCntPlayListManager.cpp
64 src/FCntContentSearchResult.cpp
65 src/FCntContentTransfer.cpp
66 src/FCntContentTransferInfo.cpp
67 src/FCntImageContentInfo.cpp
68 src/FCntImageMetadata.cpp
69 src/FCntOtherContentInfo.cpp
70 src/FCntVideoContentInfo.cpp
71 src/FCntVideoMetadata.cpp
72 src/FCntDownloadManager.cpp
73 src/FCntDownloadRequest.cpp
76 SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -Wall" )
78 ## SET C COMPILER FLAGS
79 SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
81 ## SET CPP COMPILER FLAGS
82 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
83 SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
86 ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
89 SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed")
91 TARGET_LINK_LIBRARIES(${this_target} ${pkgs_LDFLAGS})
92 TARGET_LINK_LIBRARIES(${this_target} "-losp-locations")
93 TARGET_LINK_LIBRARIES(${this_target} "-lexif")
94 TARGET_LINK_LIBRARIES(${this_target} "-lcapi-web-url-download")
95 TARGET_LINK_LIBRARIES(${this_target} "-lpthread")
97 SET_TARGET_PROPERTIES(${this_target}
100 SOVERSION ${MAJORVER}
101 CLEAN_DIRECT_OUTPUT 1
104 INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp
105 FILES_MATCHING PATTERN "*.so*"
106 PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
107 GROUP_EXECUTE GROUP_READ
108 WORLD_EXECUTE WORLD_READ)
110 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION include/osp FILES_MATCHING PATTERN "*.h")
111 INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/inc/ DESTINATION include/osp/content FILES_MATCHING PATTERN "*.h")
114 SET(PC_NAME ${this_target})
115 SET(VERSION ${FULLVER})
116 SET(PC_REQUIRED ${pc_requires})
117 SET(PC_LDFLAGS "-l${this_target} -pthread")
118 CONFIGURE_FILE(${this_target}.pc.in ${CMAKE_SOURCE_DIR}/${this_target}.pc @ONLY)
119 INSTALL(FILES ${CMAKE_SOURCE_DIR}/${this_target}.pc DESTINATION lib/pkgconfig)