CMakeLists.txt 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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(chatbot_public_header
  18. include/alibabacloud/chatbot/ChatbotClient.h
  19. include/alibabacloud/chatbot/ChatbotExport.h )
  20. set(chatbot_public_header_model
  21. include/alibabacloud/chatbot/model/ActivatePerspectiveRequest.h
  22. include/alibabacloud/chatbot/model/ActivatePerspectiveResult.h
  23. include/alibabacloud/chatbot/model/AddSynonymRequest.h
  24. include/alibabacloud/chatbot/model/AddSynonymResult.h
  25. include/alibabacloud/chatbot/model/AppendEntityMemberRequest.h
  26. include/alibabacloud/chatbot/model/AppendEntityMemberResult.h
  27. include/alibabacloud/chatbot/model/ChatRequest.h
  28. include/alibabacloud/chatbot/model/ChatResult.h
  29. include/alibabacloud/chatbot/model/CreateCategoryRequest.h
  30. include/alibabacloud/chatbot/model/CreateCategoryResult.h
  31. include/alibabacloud/chatbot/model/CreateCoreWordRequest.h
  32. include/alibabacloud/chatbot/model/CreateCoreWordResult.h
  33. include/alibabacloud/chatbot/model/CreateDialogRequest.h
  34. include/alibabacloud/chatbot/model/CreateDialogResult.h
  35. include/alibabacloud/chatbot/model/CreateEntityRequest.h
  36. include/alibabacloud/chatbot/model/CreateEntityResult.h
  37. include/alibabacloud/chatbot/model/CreateIntentRequest.h
  38. include/alibabacloud/chatbot/model/CreateIntentResult.h
  39. include/alibabacloud/chatbot/model/CreateKnowledgeRequest.h
  40. include/alibabacloud/chatbot/model/CreateKnowledgeResult.h
  41. include/alibabacloud/chatbot/model/CreatePerspectiveRequest.h
  42. include/alibabacloud/chatbot/model/CreatePerspectiveResult.h
  43. include/alibabacloud/chatbot/model/DeleteCategoryRequest.h
  44. include/alibabacloud/chatbot/model/DeleteCategoryResult.h
  45. include/alibabacloud/chatbot/model/DeleteCoreWordRequest.h
  46. include/alibabacloud/chatbot/model/DeleteCoreWordResult.h
  47. include/alibabacloud/chatbot/model/DeleteDialogRequest.h
  48. include/alibabacloud/chatbot/model/DeleteDialogResult.h
  49. include/alibabacloud/chatbot/model/DeleteEntityRequest.h
  50. include/alibabacloud/chatbot/model/DeleteEntityResult.h
  51. include/alibabacloud/chatbot/model/DeleteIntentRequest.h
  52. include/alibabacloud/chatbot/model/DeleteIntentResult.h
  53. include/alibabacloud/chatbot/model/DeleteKnowledgeRequest.h
  54. include/alibabacloud/chatbot/model/DeleteKnowledgeResult.h
  55. include/alibabacloud/chatbot/model/DescribeCategoryRequest.h
  56. include/alibabacloud/chatbot/model/DescribeCategoryResult.h
  57. include/alibabacloud/chatbot/model/DescribeCoreWordRequest.h
  58. include/alibabacloud/chatbot/model/DescribeCoreWordResult.h
  59. include/alibabacloud/chatbot/model/DescribeDialogRequest.h
  60. include/alibabacloud/chatbot/model/DescribeDialogResult.h
  61. include/alibabacloud/chatbot/model/DescribeDialogFlowRequest.h
  62. include/alibabacloud/chatbot/model/DescribeDialogFlowResult.h
  63. include/alibabacloud/chatbot/model/DescribeEntitiesRequest.h
  64. include/alibabacloud/chatbot/model/DescribeEntitiesResult.h
  65. include/alibabacloud/chatbot/model/DescribeIntentRequest.h
  66. include/alibabacloud/chatbot/model/DescribeIntentResult.h
  67. include/alibabacloud/chatbot/model/DescribeKnowledgeRequest.h
  68. include/alibabacloud/chatbot/model/DescribeKnowledgeResult.h
  69. include/alibabacloud/chatbot/model/DescribePerspectiveRequest.h
  70. include/alibabacloud/chatbot/model/DescribePerspectiveResult.h
  71. include/alibabacloud/chatbot/model/DisableDialogFlowRequest.h
  72. include/alibabacloud/chatbot/model/DisableDialogFlowResult.h
  73. include/alibabacloud/chatbot/model/DisableKnowledgeRequest.h
  74. include/alibabacloud/chatbot/model/DisableKnowledgeResult.h
  75. include/alibabacloud/chatbot/model/FeedbackRequest.h
  76. include/alibabacloud/chatbot/model/FeedbackResult.h
  77. include/alibabacloud/chatbot/model/MoveKnowledgeCategoryRequest.h
  78. include/alibabacloud/chatbot/model/MoveKnowledgeCategoryResult.h
  79. include/alibabacloud/chatbot/model/PublishDialogFlowRequest.h
  80. include/alibabacloud/chatbot/model/PublishDialogFlowResult.h
  81. include/alibabacloud/chatbot/model/PublishKnowledgeRequest.h
  82. include/alibabacloud/chatbot/model/PublishKnowledgeResult.h
  83. include/alibabacloud/chatbot/model/QueryCategoriesRequest.h
  84. include/alibabacloud/chatbot/model/QueryCategoriesResult.h
  85. include/alibabacloud/chatbot/model/QueryCoreWordsRequest.h
  86. include/alibabacloud/chatbot/model/QueryCoreWordsResult.h
  87. include/alibabacloud/chatbot/model/QueryDialogsRequest.h
  88. include/alibabacloud/chatbot/model/QueryDialogsResult.h
  89. include/alibabacloud/chatbot/model/QueryEntitiesRequest.h
  90. include/alibabacloud/chatbot/model/QueryEntitiesResult.h
  91. include/alibabacloud/chatbot/model/QueryIntentsRequest.h
  92. include/alibabacloud/chatbot/model/QueryIntentsResult.h
  93. include/alibabacloud/chatbot/model/QueryKnowledgesRequest.h
  94. include/alibabacloud/chatbot/model/QueryKnowledgesResult.h
  95. include/alibabacloud/chatbot/model/QueryPerspectivesRequest.h
  96. include/alibabacloud/chatbot/model/QueryPerspectivesResult.h
  97. include/alibabacloud/chatbot/model/QuerySystemEntitiesRequest.h
  98. include/alibabacloud/chatbot/model/QuerySystemEntitiesResult.h
  99. include/alibabacloud/chatbot/model/RemoveEntityMemberRequest.h
  100. include/alibabacloud/chatbot/model/RemoveEntityMemberResult.h
  101. include/alibabacloud/chatbot/model/RemoveSynonymRequest.h
  102. include/alibabacloud/chatbot/model/RemoveSynonymResult.h
  103. include/alibabacloud/chatbot/model/TestDialogFlowRequest.h
  104. include/alibabacloud/chatbot/model/TestDialogFlowResult.h
  105. include/alibabacloud/chatbot/model/UpdateCategoryRequest.h
  106. include/alibabacloud/chatbot/model/UpdateCategoryResult.h
  107. include/alibabacloud/chatbot/model/UpdateCoreWordRequest.h
  108. include/alibabacloud/chatbot/model/UpdateCoreWordResult.h
  109. include/alibabacloud/chatbot/model/UpdateDialogRequest.h
  110. include/alibabacloud/chatbot/model/UpdateDialogResult.h
  111. include/alibabacloud/chatbot/model/UpdateDialogFlowRequest.h
  112. include/alibabacloud/chatbot/model/UpdateDialogFlowResult.h
  113. include/alibabacloud/chatbot/model/UpdateEntityRequest.h
  114. include/alibabacloud/chatbot/model/UpdateEntityResult.h
  115. include/alibabacloud/chatbot/model/UpdateIntentRequest.h
  116. include/alibabacloud/chatbot/model/UpdateIntentResult.h
  117. include/alibabacloud/chatbot/model/UpdateKnowledgeRequest.h
  118. include/alibabacloud/chatbot/model/UpdateKnowledgeResult.h
  119. include/alibabacloud/chatbot/model/UpdatePerspectiveRequest.h
  120. include/alibabacloud/chatbot/model/UpdatePerspectiveResult.h )
  121. set(chatbot_src
  122. src/ChatbotClient.cc
  123. src/model/ActivatePerspectiveRequest.cc
  124. src/model/ActivatePerspectiveResult.cc
  125. src/model/AddSynonymRequest.cc
  126. src/model/AddSynonymResult.cc
  127. src/model/AppendEntityMemberRequest.cc
  128. src/model/AppendEntityMemberResult.cc
  129. src/model/ChatRequest.cc
  130. src/model/ChatResult.cc
  131. src/model/CreateCategoryRequest.cc
  132. src/model/CreateCategoryResult.cc
  133. src/model/CreateCoreWordRequest.cc
  134. src/model/CreateCoreWordResult.cc
  135. src/model/CreateDialogRequest.cc
  136. src/model/CreateDialogResult.cc
  137. src/model/CreateEntityRequest.cc
  138. src/model/CreateEntityResult.cc
  139. src/model/CreateIntentRequest.cc
  140. src/model/CreateIntentResult.cc
  141. src/model/CreateKnowledgeRequest.cc
  142. src/model/CreateKnowledgeResult.cc
  143. src/model/CreatePerspectiveRequest.cc
  144. src/model/CreatePerspectiveResult.cc
  145. src/model/DeleteCategoryRequest.cc
  146. src/model/DeleteCategoryResult.cc
  147. src/model/DeleteCoreWordRequest.cc
  148. src/model/DeleteCoreWordResult.cc
  149. src/model/DeleteDialogRequest.cc
  150. src/model/DeleteDialogResult.cc
  151. src/model/DeleteEntityRequest.cc
  152. src/model/DeleteEntityResult.cc
  153. src/model/DeleteIntentRequest.cc
  154. src/model/DeleteIntentResult.cc
  155. src/model/DeleteKnowledgeRequest.cc
  156. src/model/DeleteKnowledgeResult.cc
  157. src/model/DescribeCategoryRequest.cc
  158. src/model/DescribeCategoryResult.cc
  159. src/model/DescribeCoreWordRequest.cc
  160. src/model/DescribeCoreWordResult.cc
  161. src/model/DescribeDialogRequest.cc
  162. src/model/DescribeDialogResult.cc
  163. src/model/DescribeDialogFlowRequest.cc
  164. src/model/DescribeDialogFlowResult.cc
  165. src/model/DescribeEntitiesRequest.cc
  166. src/model/DescribeEntitiesResult.cc
  167. src/model/DescribeIntentRequest.cc
  168. src/model/DescribeIntentResult.cc
  169. src/model/DescribeKnowledgeRequest.cc
  170. src/model/DescribeKnowledgeResult.cc
  171. src/model/DescribePerspectiveRequest.cc
  172. src/model/DescribePerspectiveResult.cc
  173. src/model/DisableDialogFlowRequest.cc
  174. src/model/DisableDialogFlowResult.cc
  175. src/model/DisableKnowledgeRequest.cc
  176. src/model/DisableKnowledgeResult.cc
  177. src/model/FeedbackRequest.cc
  178. src/model/FeedbackResult.cc
  179. src/model/MoveKnowledgeCategoryRequest.cc
  180. src/model/MoveKnowledgeCategoryResult.cc
  181. src/model/PublishDialogFlowRequest.cc
  182. src/model/PublishDialogFlowResult.cc
  183. src/model/PublishKnowledgeRequest.cc
  184. src/model/PublishKnowledgeResult.cc
  185. src/model/QueryCategoriesRequest.cc
  186. src/model/QueryCategoriesResult.cc
  187. src/model/QueryCoreWordsRequest.cc
  188. src/model/QueryCoreWordsResult.cc
  189. src/model/QueryDialogsRequest.cc
  190. src/model/QueryDialogsResult.cc
  191. src/model/QueryEntitiesRequest.cc
  192. src/model/QueryEntitiesResult.cc
  193. src/model/QueryIntentsRequest.cc
  194. src/model/QueryIntentsResult.cc
  195. src/model/QueryKnowledgesRequest.cc
  196. src/model/QueryKnowledgesResult.cc
  197. src/model/QueryPerspectivesRequest.cc
  198. src/model/QueryPerspectivesResult.cc
  199. src/model/QuerySystemEntitiesRequest.cc
  200. src/model/QuerySystemEntitiesResult.cc
  201. src/model/RemoveEntityMemberRequest.cc
  202. src/model/RemoveEntityMemberResult.cc
  203. src/model/RemoveSynonymRequest.cc
  204. src/model/RemoveSynonymResult.cc
  205. src/model/TestDialogFlowRequest.cc
  206. src/model/TestDialogFlowResult.cc
  207. src/model/UpdateCategoryRequest.cc
  208. src/model/UpdateCategoryResult.cc
  209. src/model/UpdateCoreWordRequest.cc
  210. src/model/UpdateCoreWordResult.cc
  211. src/model/UpdateDialogRequest.cc
  212. src/model/UpdateDialogResult.cc
  213. src/model/UpdateDialogFlowRequest.cc
  214. src/model/UpdateDialogFlowResult.cc
  215. src/model/UpdateEntityRequest.cc
  216. src/model/UpdateEntityResult.cc
  217. src/model/UpdateIntentRequest.cc
  218. src/model/UpdateIntentResult.cc
  219. src/model/UpdateKnowledgeRequest.cc
  220. src/model/UpdateKnowledgeResult.cc
  221. src/model/UpdatePerspectiveRequest.cc
  222. src/model/UpdatePerspectiveResult.cc )
  223. add_library(chatbot ${LIB_TYPE}
  224. ${chatbot_public_header}
  225. ${chatbot_public_header_model}
  226. ${chatbot_src})
  227. set_target_properties(chatbot
  228. PROPERTIES
  229. LINKER_LANGUAGE CXX
  230. ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  231. LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  232. RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
  233. OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}chatbot
  234. )
  235. if(${LIB_TYPE} STREQUAL "SHARED")
  236. set_target_properties(chatbot
  237. PROPERTIES
  238. DEFINE_SYMBOL ALIBABACLOUD_CHATBOT_LIBRARY)
  239. endif()
  240. target_include_directories(chatbot
  241. PRIVATE include
  242. ${CMAKE_SOURCE_DIR}/core/include
  243. )
  244. target_link_libraries(chatbot
  245. core)
  246. if(CMAKE_HOST_WIN32)
  247. ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
  248. set(jsoncpp_install_dir ${INSTALL_DIR})
  249. add_dependencies(chatbot
  250. jsoncpp)
  251. target_include_directories(chatbot
  252. PRIVATE ${jsoncpp_install_dir}/include)
  253. target_link_libraries(chatbot
  254. ${jsoncpp_install_dir}/lib/jsoncpp.lib)
  255. set_target_properties(chatbot
  256. PROPERTIES
  257. COMPILE_OPTIONS "/bigobj")
  258. else()
  259. target_include_directories(chatbot
  260. PRIVATE /usr/include/jsoncpp)
  261. target_link_libraries(chatbot
  262. jsoncpp)
  263. endif()
  264. install(FILES ${chatbot_public_header}
  265. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/chatbot)
  266. install(FILES ${chatbot_public_header_model}
  267. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/chatbot/model)
  268. install(TARGETS chatbot
  269. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  270. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  271. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  272. )