CMakeLists.txt 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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(nlp-automl_public_header
  18. include/alibabacloud/nlp-automl/Nlp_automlClient.h
  19. include/alibabacloud/nlp-automl/Nlp_automlExport.h )
  20. set(nlp-automl_public_header_model
  21. include/alibabacloud/nlp-automl/model/AddMTInterveneWordRequest.h
  22. include/alibabacloud/nlp-automl/model/AddMTInterveneWordResult.h
  23. include/alibabacloud/nlp-automl/model/AddMtIntervenePackageRequest.h
  24. include/alibabacloud/nlp-automl/model/AddMtIntervenePackageResult.h
  25. include/alibabacloud/nlp-automl/model/BindIntervenePackageAndModelRequest.h
  26. include/alibabacloud/nlp-automl/model/BindIntervenePackageAndModelResult.h
  27. include/alibabacloud/nlp-automl/model/CreateAsyncPredictRequest.h
  28. include/alibabacloud/nlp-automl/model/CreateAsyncPredictResult.h
  29. include/alibabacloud/nlp-automl/model/CreateDatasetRequest.h
  30. include/alibabacloud/nlp-automl/model/CreateDatasetResult.h
  31. include/alibabacloud/nlp-automl/model/CreateDatasetRecordRequest.h
  32. include/alibabacloud/nlp-automl/model/CreateDatasetRecordResult.h
  33. include/alibabacloud/nlp-automl/model/CreateModelRequest.h
  34. include/alibabacloud/nlp-automl/model/CreateModelResult.h
  35. include/alibabacloud/nlp-automl/model/CreateProjectRequest.h
  36. include/alibabacloud/nlp-automl/model/CreateProjectResult.h
  37. include/alibabacloud/nlp-automl/model/DeleteModelRequest.h
  38. include/alibabacloud/nlp-automl/model/DeleteModelResult.h
  39. include/alibabacloud/nlp-automl/model/DeployModelRequest.h
  40. include/alibabacloud/nlp-automl/model/DeployModelResult.h
  41. include/alibabacloud/nlp-automl/model/GetAsyncPredictRequest.h
  42. include/alibabacloud/nlp-automl/model/GetAsyncPredictResult.h
  43. include/alibabacloud/nlp-automl/model/GetModelRequest.h
  44. include/alibabacloud/nlp-automl/model/GetModelResult.h
  45. include/alibabacloud/nlp-automl/model/GetPredictDocRequest.h
  46. include/alibabacloud/nlp-automl/model/GetPredictDocResult.h
  47. include/alibabacloud/nlp-automl/model/GetPredictResultRequest.h
  48. include/alibabacloud/nlp-automl/model/GetPredictResultResult.h
  49. include/alibabacloud/nlp-automl/model/InvokeActionRequest.h
  50. include/alibabacloud/nlp-automl/model/InvokeActionResult.h
  51. include/alibabacloud/nlp-automl/model/ListDatasetRequest.h
  52. include/alibabacloud/nlp-automl/model/ListDatasetResult.h
  53. include/alibabacloud/nlp-automl/model/ListModelsRequest.h
  54. include/alibabacloud/nlp-automl/model/ListModelsResult.h
  55. include/alibabacloud/nlp-automl/model/PredictMTModelRequest.h
  56. include/alibabacloud/nlp-automl/model/PredictMTModelResult.h
  57. include/alibabacloud/nlp-automl/model/PredictMTModelByDocRequest.h
  58. include/alibabacloud/nlp-automl/model/PredictMTModelByDocResult.h
  59. include/alibabacloud/nlp-automl/model/RunContactReviewRequest.h
  60. include/alibabacloud/nlp-automl/model/RunContactReviewResult.h
  61. include/alibabacloud/nlp-automl/model/RunPreTrainServiceRequest.h
  62. include/alibabacloud/nlp-automl/model/RunPreTrainServiceResult.h
  63. include/alibabacloud/nlp-automl/model/RunSmartCallServiceRequest.h
  64. include/alibabacloud/nlp-automl/model/RunSmartCallServiceResult.h )
  65. set(nlp-automl_src
  66. src/Nlp-automlClient.cc
  67. src/model/AddMTInterveneWordRequest.cc
  68. src/model/AddMTInterveneWordResult.cc
  69. src/model/AddMtIntervenePackageRequest.cc
  70. src/model/AddMtIntervenePackageResult.cc
  71. src/model/BindIntervenePackageAndModelRequest.cc
  72. src/model/BindIntervenePackageAndModelResult.cc
  73. src/model/CreateAsyncPredictRequest.cc
  74. src/model/CreateAsyncPredictResult.cc
  75. src/model/CreateDatasetRequest.cc
  76. src/model/CreateDatasetResult.cc
  77. src/model/CreateDatasetRecordRequest.cc
  78. src/model/CreateDatasetRecordResult.cc
  79. src/model/CreateModelRequest.cc
  80. src/model/CreateModelResult.cc
  81. src/model/CreateProjectRequest.cc
  82. src/model/CreateProjectResult.cc
  83. src/model/DeleteModelRequest.cc
  84. src/model/DeleteModelResult.cc
  85. src/model/DeployModelRequest.cc
  86. src/model/DeployModelResult.cc
  87. src/model/GetAsyncPredictRequest.cc
  88. src/model/GetAsyncPredictResult.cc
  89. src/model/GetModelRequest.cc
  90. src/model/GetModelResult.cc
  91. src/model/GetPredictDocRequest.cc
  92. src/model/GetPredictDocResult.cc
  93. src/model/GetPredictResultRequest.cc
  94. src/model/GetPredictResultResult.cc
  95. src/model/InvokeActionRequest.cc
  96. src/model/InvokeActionResult.cc
  97. src/model/ListDatasetRequest.cc
  98. src/model/ListDatasetResult.cc
  99. src/model/ListModelsRequest.cc
  100. src/model/ListModelsResult.cc
  101. src/model/PredictMTModelRequest.cc
  102. src/model/PredictMTModelResult.cc
  103. src/model/PredictMTModelByDocRequest.cc
  104. src/model/PredictMTModelByDocResult.cc
  105. src/model/RunContactReviewRequest.cc
  106. src/model/RunContactReviewResult.cc
  107. src/model/RunPreTrainServiceRequest.cc
  108. src/model/RunPreTrainServiceResult.cc
  109. src/model/RunSmartCallServiceRequest.cc
  110. src/model/RunSmartCallServiceResult.cc )
  111. add_library(nlp-automl ${LIB_TYPE}
  112. ${nlp-automl_public_header}
  113. ${nlp-automl_public_header_model}
  114. ${nlp-automl_src})
  115. set_target_properties(nlp-automl
  116. PROPERTIES
  117. LINKER_LANGUAGE CXX
  118. ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  119. LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  120. RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
  121. OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}nlp-automl
  122. )
  123. if(${LIB_TYPE} STREQUAL "SHARED")
  124. set_target_properties(nlp-automl
  125. PROPERTIES
  126. DEFINE_SYMBOL ALIBABACLOUD_NLP_AUTOML_LIBRARY)
  127. endif()
  128. target_include_directories(nlp-automl
  129. PRIVATE include
  130. ${CMAKE_SOURCE_DIR}/core/include
  131. )
  132. target_link_libraries(nlp-automl
  133. core)
  134. if(CMAKE_HOST_WIN32)
  135. ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
  136. set(jsoncpp_install_dir ${INSTALL_DIR})
  137. add_dependencies(nlp-automl
  138. jsoncpp)
  139. target_include_directories(nlp-automl
  140. PRIVATE ${jsoncpp_install_dir}/include)
  141. target_link_libraries(nlp-automl
  142. ${jsoncpp_install_dir}/lib/jsoncpp.lib)
  143. set_target_properties(nlp-automl
  144. PROPERTIES
  145. COMPILE_OPTIONS "/bigobj")
  146. else()
  147. target_include_directories(nlp-automl
  148. PRIVATE /usr/include/jsoncpp)
  149. target_link_libraries(nlp-automl
  150. jsoncpp)
  151. endif()
  152. install(FILES ${nlp-automl_public_header}
  153. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/nlp-automl)
  154. install(FILES ${nlp-automl_public_header_model}
  155. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/nlp-automl/model)
  156. install(TARGETS nlp-automl
  157. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  158. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  159. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  160. )