CMakeLists.txt 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. #
  2. # Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. set(public_header_dir ${CMAKE_CURRENT_SOURCE_DIR}/../include)
  17. set(cloudphoto_public_header
  18. include/alibabacloud/cloudphoto/CloudPhotoClient.h
  19. include/alibabacloud/cloudphoto/CloudPhotoExport.h )
  20. set(cloudphoto_public_header_model
  21. include/alibabacloud/cloudphoto/model/RemoveFacePhotosRequest.h
  22. include/alibabacloud/cloudphoto/model/RemoveFacePhotosResult.h
  23. include/alibabacloud/cloudphoto/model/GetQuotaRequest.h
  24. include/alibabacloud/cloudphoto/model/GetQuotaResult.h
  25. include/alibabacloud/cloudphoto/model/ReactivatePhotosRequest.h
  26. include/alibabacloud/cloudphoto/model/ReactivatePhotosResult.h
  27. include/alibabacloud/cloudphoto/model/GetThumbnailsRequest.h
  28. include/alibabacloud/cloudphoto/model/GetThumbnailsResult.h
  29. include/alibabacloud/cloudphoto/model/DeleteFacesRequest.h
  30. include/alibabacloud/cloudphoto/model/DeleteFacesResult.h
  31. include/alibabacloud/cloudphoto/model/AddAlbumPhotosRequest.h
  32. include/alibabacloud/cloudphoto/model/AddAlbumPhotosResult.h
  33. include/alibabacloud/cloudphoto/model/ListFacesRequest.h
  34. include/alibabacloud/cloudphoto/model/ListFacesResult.h
  35. include/alibabacloud/cloudphoto/model/MoveFacePhotosRequest.h
  36. include/alibabacloud/cloudphoto/model/MoveFacePhotosResult.h
  37. include/alibabacloud/cloudphoto/model/DeleteEventRequest.h
  38. include/alibabacloud/cloudphoto/model/DeleteEventResult.h
  39. include/alibabacloud/cloudphoto/model/RegisterTagRequest.h
  40. include/alibabacloud/cloudphoto/model/RegisterTagResult.h
  41. include/alibabacloud/cloudphoto/model/ListPhotosRequest.h
  42. include/alibabacloud/cloudphoto/model/ListPhotosResult.h
  43. include/alibabacloud/cloudphoto/model/FetchMomentPhotosRequest.h
  44. include/alibabacloud/cloudphoto/model/FetchMomentPhotosResult.h
  45. include/alibabacloud/cloudphoto/model/ListTimeLinePhotosRequest.h
  46. include/alibabacloud/cloudphoto/model/ListTimeLinePhotosResult.h
  47. include/alibabacloud/cloudphoto/model/DeletePhotosRequest.h
  48. include/alibabacloud/cloudphoto/model/DeletePhotosResult.h
  49. include/alibabacloud/cloudphoto/model/GetPhotosByMd5sRequest.h
  50. include/alibabacloud/cloudphoto/model/GetPhotosByMd5sResult.h
  51. include/alibabacloud/cloudphoto/model/MergeFacesRequest.h
  52. include/alibabacloud/cloudphoto/model/MergeFacesResult.h
  53. include/alibabacloud/cloudphoto/model/FetchLibrariesRequest.h
  54. include/alibabacloud/cloudphoto/model/FetchLibrariesResult.h
  55. include/alibabacloud/cloudphoto/model/FetchAlbumTagPhotosRequest.h
  56. include/alibabacloud/cloudphoto/model/FetchAlbumTagPhotosResult.h
  57. include/alibabacloud/cloudphoto/model/InactivatePhotosRequest.h
  58. include/alibabacloud/cloudphoto/model/InactivatePhotosResult.h
  59. include/alibabacloud/cloudphoto/model/CreateTransactionRequest.h
  60. include/alibabacloud/cloudphoto/model/CreateTransactionResult.h
  61. include/alibabacloud/cloudphoto/model/GetLibraryRequest.h
  62. include/alibabacloud/cloudphoto/model/GetLibraryResult.h
  63. include/alibabacloud/cloudphoto/model/CreatePhotoStoreRequest.h
  64. include/alibabacloud/cloudphoto/model/CreatePhotoStoreResult.h
  65. include/alibabacloud/cloudphoto/model/TagPhotoRequest.h
  66. include/alibabacloud/cloudphoto/model/TagPhotoResult.h
  67. include/alibabacloud/cloudphoto/model/SetQuotaRequest.h
  68. include/alibabacloud/cloudphoto/model/SetQuotaResult.h
  69. include/alibabacloud/cloudphoto/model/RemoveAlbumPhotosRequest.h
  70. include/alibabacloud/cloudphoto/model/RemoveAlbumPhotosResult.h
  71. include/alibabacloud/cloudphoto/model/ListAlbumPhotosRequest.h
  72. include/alibabacloud/cloudphoto/model/ListAlbumPhotosResult.h
  73. include/alibabacloud/cloudphoto/model/ListAlbumsRequest.h
  74. include/alibabacloud/cloudphoto/model/ListAlbumsResult.h
  75. include/alibabacloud/cloudphoto/model/FetchPhotosRequest.h
  76. include/alibabacloud/cloudphoto/model/FetchPhotosResult.h
  77. include/alibabacloud/cloudphoto/model/ListPhotoFacesRequest.h
  78. include/alibabacloud/cloudphoto/model/ListPhotoFacesResult.h
  79. include/alibabacloud/cloudphoto/model/RenameAlbumRequest.h
  80. include/alibabacloud/cloudphoto/model/RenameAlbumResult.h
  81. include/alibabacloud/cloudphoto/model/ActivatePhotosRequest.h
  82. include/alibabacloud/cloudphoto/model/ActivatePhotosResult.h
  83. include/alibabacloud/cloudphoto/model/GetPrivateAccessUrlsRequest.h
  84. include/alibabacloud/cloudphoto/model/GetPrivateAccessUrlsResult.h
  85. include/alibabacloud/cloudphoto/model/ListEventsRequest.h
  86. include/alibabacloud/cloudphoto/model/ListEventsResult.h
  87. include/alibabacloud/cloudphoto/model/GetSimilarPhotosRequest.h
  88. include/alibabacloud/cloudphoto/model/GetSimilarPhotosResult.h
  89. include/alibabacloud/cloudphoto/model/GetVideoCoverRequest.h
  90. include/alibabacloud/cloudphoto/model/GetVideoCoverResult.h
  91. include/alibabacloud/cloudphoto/model/GetFramedPhotoUrlsRequest.h
  92. include/alibabacloud/cloudphoto/model/GetFramedPhotoUrlsResult.h
  93. include/alibabacloud/cloudphoto/model/GetEventRequest.h
  94. include/alibabacloud/cloudphoto/model/GetEventResult.h
  95. include/alibabacloud/cloudphoto/model/SetMeRequest.h
  96. include/alibabacloud/cloudphoto/model/SetMeResult.h
  97. include/alibabacloud/cloudphoto/model/ListTagPhotosRequest.h
  98. include/alibabacloud/cloudphoto/model/ListTagPhotosResult.h
  99. include/alibabacloud/cloudphoto/model/DeleteAlbumsRequest.h
  100. include/alibabacloud/cloudphoto/model/DeleteAlbumsResult.h
  101. include/alibabacloud/cloudphoto/model/GetDownloadUrlsRequest.h
  102. include/alibabacloud/cloudphoto/model/GetDownloadUrlsResult.h
  103. include/alibabacloud/cloudphoto/model/RegisterPhotoRequest.h
  104. include/alibabacloud/cloudphoto/model/RegisterPhotoResult.h
  105. include/alibabacloud/cloudphoto/model/GetPhotosRequest.h
  106. include/alibabacloud/cloudphoto/model/GetPhotosResult.h
  107. include/alibabacloud/cloudphoto/model/EditPhotoStoreRequest.h
  108. include/alibabacloud/cloudphoto/model/EditPhotoStoreResult.h
  109. include/alibabacloud/cloudphoto/model/ListTimeLinesRequest.h
  110. include/alibabacloud/cloudphoto/model/ListTimeLinesResult.h
  111. include/alibabacloud/cloudphoto/model/SearchPhotosRequest.h
  112. include/alibabacloud/cloudphoto/model/SearchPhotosResult.h
  113. include/alibabacloud/cloudphoto/model/ToggleFeaturesRequest.h
  114. include/alibabacloud/cloudphoto/model/ToggleFeaturesResult.h
  115. include/alibabacloud/cloudphoto/model/ListRegisteredTagsRequest.h
  116. include/alibabacloud/cloudphoto/model/ListRegisteredTagsResult.h
  117. include/alibabacloud/cloudphoto/model/DeletePhotoStoreRequest.h
  118. include/alibabacloud/cloudphoto/model/DeletePhotoStoreResult.h
  119. include/alibabacloud/cloudphoto/model/CreateEventRequest.h
  120. include/alibabacloud/cloudphoto/model/CreateEventResult.h
  121. include/alibabacloud/cloudphoto/model/GetPhotoStoreRequest.h
  122. include/alibabacloud/cloudphoto/model/GetPhotoStoreResult.h
  123. include/alibabacloud/cloudphoto/model/ListMomentPhotosRequest.h
  124. include/alibabacloud/cloudphoto/model/ListMomentPhotosResult.h
  125. include/alibabacloud/cloudphoto/model/GetThumbnailRequest.h
  126. include/alibabacloud/cloudphoto/model/GetThumbnailResult.h
  127. include/alibabacloud/cloudphoto/model/SetFaceCoverRequest.h
  128. include/alibabacloud/cloudphoto/model/SetFaceCoverResult.h
  129. include/alibabacloud/cloudphoto/model/CreatePhotoRequest.h
  130. include/alibabacloud/cloudphoto/model/CreatePhotoResult.h
  131. include/alibabacloud/cloudphoto/model/MoveAlbumPhotosRequest.h
  132. include/alibabacloud/cloudphoto/model/MoveAlbumPhotosResult.h
  133. include/alibabacloud/cloudphoto/model/EditEventRequest.h
  134. include/alibabacloud/cloudphoto/model/EditEventResult.h
  135. include/alibabacloud/cloudphoto/model/GetDownloadUrlRequest.h
  136. include/alibabacloud/cloudphoto/model/GetDownloadUrlResult.h
  137. include/alibabacloud/cloudphoto/model/CreateAlbumRequest.h
  138. include/alibabacloud/cloudphoto/model/CreateAlbumResult.h
  139. include/alibabacloud/cloudphoto/model/ListPhotoTagsRequest.h
  140. include/alibabacloud/cloudphoto/model/ListPhotoTagsResult.h
  141. include/alibabacloud/cloudphoto/model/LikePhotoRequest.h
  142. include/alibabacloud/cloudphoto/model/LikePhotoResult.h
  143. include/alibabacloud/cloudphoto/model/ListPhotoStoresRequest.h
  144. include/alibabacloud/cloudphoto/model/ListPhotoStoresResult.h
  145. include/alibabacloud/cloudphoto/model/GetAlbumsByNamesRequest.h
  146. include/alibabacloud/cloudphoto/model/GetAlbumsByNamesResult.h
  147. include/alibabacloud/cloudphoto/model/GetPublicAccessUrlsRequest.h
  148. include/alibabacloud/cloudphoto/model/GetPublicAccessUrlsResult.h
  149. include/alibabacloud/cloudphoto/model/EditPhotosRequest.h
  150. include/alibabacloud/cloudphoto/model/EditPhotosResult.h
  151. include/alibabacloud/cloudphoto/model/SetAlbumCoverRequest.h
  152. include/alibabacloud/cloudphoto/model/SetAlbumCoverResult.h
  153. include/alibabacloud/cloudphoto/model/RenameFaceRequest.h
  154. include/alibabacloud/cloudphoto/model/RenameFaceResult.h
  155. include/alibabacloud/cloudphoto/model/ListMomentsRequest.h
  156. include/alibabacloud/cloudphoto/model/ListMomentsResult.h
  157. include/alibabacloud/cloudphoto/model/ListTagsRequest.h
  158. include/alibabacloud/cloudphoto/model/ListTagsResult.h
  159. include/alibabacloud/cloudphoto/model/ListFacePhotosRequest.h
  160. include/alibabacloud/cloudphoto/model/ListFacePhotosResult.h )
  161. set(cloudphoto_src
  162. src/CloudPhotoClient.cc
  163. src/model/RemoveFacePhotosRequest.cc
  164. src/model/RemoveFacePhotosResult.cc
  165. src/model/GetQuotaRequest.cc
  166. src/model/GetQuotaResult.cc
  167. src/model/ReactivatePhotosRequest.cc
  168. src/model/ReactivatePhotosResult.cc
  169. src/model/GetThumbnailsRequest.cc
  170. src/model/GetThumbnailsResult.cc
  171. src/model/DeleteFacesRequest.cc
  172. src/model/DeleteFacesResult.cc
  173. src/model/AddAlbumPhotosRequest.cc
  174. src/model/AddAlbumPhotosResult.cc
  175. src/model/ListFacesRequest.cc
  176. src/model/ListFacesResult.cc
  177. src/model/MoveFacePhotosRequest.cc
  178. src/model/MoveFacePhotosResult.cc
  179. src/model/DeleteEventRequest.cc
  180. src/model/DeleteEventResult.cc
  181. src/model/RegisterTagRequest.cc
  182. src/model/RegisterTagResult.cc
  183. src/model/ListPhotosRequest.cc
  184. src/model/ListPhotosResult.cc
  185. src/model/FetchMomentPhotosRequest.cc
  186. src/model/FetchMomentPhotosResult.cc
  187. src/model/ListTimeLinePhotosRequest.cc
  188. src/model/ListTimeLinePhotosResult.cc
  189. src/model/DeletePhotosRequest.cc
  190. src/model/DeletePhotosResult.cc
  191. src/model/GetPhotosByMd5sRequest.cc
  192. src/model/GetPhotosByMd5sResult.cc
  193. src/model/MergeFacesRequest.cc
  194. src/model/MergeFacesResult.cc
  195. src/model/FetchLibrariesRequest.cc
  196. src/model/FetchLibrariesResult.cc
  197. src/model/FetchAlbumTagPhotosRequest.cc
  198. src/model/FetchAlbumTagPhotosResult.cc
  199. src/model/InactivatePhotosRequest.cc
  200. src/model/InactivatePhotosResult.cc
  201. src/model/CreateTransactionRequest.cc
  202. src/model/CreateTransactionResult.cc
  203. src/model/GetLibraryRequest.cc
  204. src/model/GetLibraryResult.cc
  205. src/model/CreatePhotoStoreRequest.cc
  206. src/model/CreatePhotoStoreResult.cc
  207. src/model/TagPhotoRequest.cc
  208. src/model/TagPhotoResult.cc
  209. src/model/SetQuotaRequest.cc
  210. src/model/SetQuotaResult.cc
  211. src/model/RemoveAlbumPhotosRequest.cc
  212. src/model/RemoveAlbumPhotosResult.cc
  213. src/model/ListAlbumPhotosRequest.cc
  214. src/model/ListAlbumPhotosResult.cc
  215. src/model/ListAlbumsRequest.cc
  216. src/model/ListAlbumsResult.cc
  217. src/model/FetchPhotosRequest.cc
  218. src/model/FetchPhotosResult.cc
  219. src/model/ListPhotoFacesRequest.cc
  220. src/model/ListPhotoFacesResult.cc
  221. src/model/RenameAlbumRequest.cc
  222. src/model/RenameAlbumResult.cc
  223. src/model/ActivatePhotosRequest.cc
  224. src/model/ActivatePhotosResult.cc
  225. src/model/GetPrivateAccessUrlsRequest.cc
  226. src/model/GetPrivateAccessUrlsResult.cc
  227. src/model/ListEventsRequest.cc
  228. src/model/ListEventsResult.cc
  229. src/model/GetSimilarPhotosRequest.cc
  230. src/model/GetSimilarPhotosResult.cc
  231. src/model/GetVideoCoverRequest.cc
  232. src/model/GetVideoCoverResult.cc
  233. src/model/GetFramedPhotoUrlsRequest.cc
  234. src/model/GetFramedPhotoUrlsResult.cc
  235. src/model/GetEventRequest.cc
  236. src/model/GetEventResult.cc
  237. src/model/SetMeRequest.cc
  238. src/model/SetMeResult.cc
  239. src/model/ListTagPhotosRequest.cc
  240. src/model/ListTagPhotosResult.cc
  241. src/model/DeleteAlbumsRequest.cc
  242. src/model/DeleteAlbumsResult.cc
  243. src/model/GetDownloadUrlsRequest.cc
  244. src/model/GetDownloadUrlsResult.cc
  245. src/model/RegisterPhotoRequest.cc
  246. src/model/RegisterPhotoResult.cc
  247. src/model/GetPhotosRequest.cc
  248. src/model/GetPhotosResult.cc
  249. src/model/EditPhotoStoreRequest.cc
  250. src/model/EditPhotoStoreResult.cc
  251. src/model/ListTimeLinesRequest.cc
  252. src/model/ListTimeLinesResult.cc
  253. src/model/SearchPhotosRequest.cc
  254. src/model/SearchPhotosResult.cc
  255. src/model/ToggleFeaturesRequest.cc
  256. src/model/ToggleFeaturesResult.cc
  257. src/model/ListRegisteredTagsRequest.cc
  258. src/model/ListRegisteredTagsResult.cc
  259. src/model/DeletePhotoStoreRequest.cc
  260. src/model/DeletePhotoStoreResult.cc
  261. src/model/CreateEventRequest.cc
  262. src/model/CreateEventResult.cc
  263. src/model/GetPhotoStoreRequest.cc
  264. src/model/GetPhotoStoreResult.cc
  265. src/model/ListMomentPhotosRequest.cc
  266. src/model/ListMomentPhotosResult.cc
  267. src/model/GetThumbnailRequest.cc
  268. src/model/GetThumbnailResult.cc
  269. src/model/SetFaceCoverRequest.cc
  270. src/model/SetFaceCoverResult.cc
  271. src/model/CreatePhotoRequest.cc
  272. src/model/CreatePhotoResult.cc
  273. src/model/MoveAlbumPhotosRequest.cc
  274. src/model/MoveAlbumPhotosResult.cc
  275. src/model/EditEventRequest.cc
  276. src/model/EditEventResult.cc
  277. src/model/GetDownloadUrlRequest.cc
  278. src/model/GetDownloadUrlResult.cc
  279. src/model/CreateAlbumRequest.cc
  280. src/model/CreateAlbumResult.cc
  281. src/model/ListPhotoTagsRequest.cc
  282. src/model/ListPhotoTagsResult.cc
  283. src/model/LikePhotoRequest.cc
  284. src/model/LikePhotoResult.cc
  285. src/model/ListPhotoStoresRequest.cc
  286. src/model/ListPhotoStoresResult.cc
  287. src/model/GetAlbumsByNamesRequest.cc
  288. src/model/GetAlbumsByNamesResult.cc
  289. src/model/GetPublicAccessUrlsRequest.cc
  290. src/model/GetPublicAccessUrlsResult.cc
  291. src/model/EditPhotosRequest.cc
  292. src/model/EditPhotosResult.cc
  293. src/model/SetAlbumCoverRequest.cc
  294. src/model/SetAlbumCoverResult.cc
  295. src/model/RenameFaceRequest.cc
  296. src/model/RenameFaceResult.cc
  297. src/model/ListMomentsRequest.cc
  298. src/model/ListMomentsResult.cc
  299. src/model/ListTagsRequest.cc
  300. src/model/ListTagsResult.cc
  301. src/model/ListFacePhotosRequest.cc
  302. src/model/ListFacePhotosResult.cc )
  303. add_library(cloudphoto ${LIB_TYPE}
  304. ${cloudphoto_public_header}
  305. ${cloudphoto_public_header_model}
  306. ${cloudphoto_src})
  307. set_target_properties(cloudphoto
  308. PROPERTIES
  309. LINKER_LANGUAGE CXX
  310. ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  311. LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  312. RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
  313. OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}cloudphoto
  314. )
  315. if(${LIB_TYPE} STREQUAL "SHARED")
  316. set_target_properties(cloudphoto
  317. PROPERTIES
  318. DEFINE_SYMBOL ALIBABACLOUD_CLOUDPHOTO_LIBRARY)
  319. endif()
  320. target_include_directories(cloudphoto
  321. PRIVATE include
  322. ${CMAKE_SOURCE_DIR}/core/include
  323. )
  324. target_link_libraries(cloudphoto
  325. core)
  326. if(CMAKE_HOST_WIN32)
  327. ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
  328. set(jsoncpp_install_dir ${INSTALL_DIR})
  329. add_dependencies(cloudphoto
  330. jsoncpp)
  331. target_include_directories(cloudphoto
  332. PRIVATE ${jsoncpp_install_dir}/include)
  333. target_link_libraries(cloudphoto
  334. ${jsoncpp_install_dir}/lib/jsoncpp.lib)
  335. set_target_properties(cloudphoto
  336. PROPERTIES
  337. COMPILE_OPTIONS "/bigobj")
  338. else()
  339. target_include_directories(cloudphoto
  340. PRIVATE /usr/include/jsoncpp)
  341. target_link_libraries(cloudphoto
  342. jsoncpp)
  343. endif()
  344. install(FILES ${cloudphoto_public_header}
  345. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/cloudphoto)
  346. install(FILES ${cloudphoto_public_header_model}
  347. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/cloudphoto/model)
  348. install(TARGETS cloudphoto
  349. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  350. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  351. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  352. )