CMakeLists.txt 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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(mseap_public_header
  18. include/alibabacloud/mseap/MseapClient.h
  19. include/alibabacloud/mseap/MseapExport.h )
  20. set(mseap_public_header_model
  21. include/alibabacloud/mseap/model/ActivateLicenseRequest.h
  22. include/alibabacloud/mseap/model/ActivateLicenseResult.h
  23. include/alibabacloud/mseap/model/CallbackTaskRequest.h
  24. include/alibabacloud/mseap/model/CallbackTaskResult.h
  25. include/alibabacloud/mseap/model/DescribeAgreementStatusRequest.h
  26. include/alibabacloud/mseap/model/DescribeAgreementStatusResult.h
  27. include/alibabacloud/mseap/model/GenerateUploadFilePolicyForPartnerRequest.h
  28. include/alibabacloud/mseap/model/GenerateUploadFilePolicyForPartnerResult.h
  29. include/alibabacloud/mseap/model/GetNodeByFlowIdRequest.h
  30. include/alibabacloud/mseap/model/GetNodeByFlowIdResult.h
  31. include/alibabacloud/mseap/model/GetNodeByTemplateIdRequest.h
  32. include/alibabacloud/mseap/model/GetNodeByTemplateIdResult.h
  33. include/alibabacloud/mseap/model/GetPlatformUserInfoForPartnerRequest.h
  34. include/alibabacloud/mseap/model/GetPlatformUserInfoForPartnerResult.h
  35. include/alibabacloud/mseap/model/GetProxyByTypeRequest.h
  36. include/alibabacloud/mseap/model/GetProxyByTypeResult.h
  37. include/alibabacloud/mseap/model/GetRedisValueRequest.h
  38. include/alibabacloud/mseap/model/GetRedisValueResult.h
  39. include/alibabacloud/mseap/model/GetVariableRequest.h
  40. include/alibabacloud/mseap/model/GetVariableResult.h
  41. include/alibabacloud/mseap/model/IdentifyCodeRequest.h
  42. include/alibabacloud/mseap/model/IdentifyCodeResult.h
  43. include/alibabacloud/mseap/model/PullRpaModelRequest.h
  44. include/alibabacloud/mseap/model/PullRpaModelResult.h
  45. include/alibabacloud/mseap/model/PullTaskRequest.h
  46. include/alibabacloud/mseap/model/PullTaskResult.h
  47. include/alibabacloud/mseap/model/PushRpaTaskRequest.h
  48. include/alibabacloud/mseap/model/PushRpaTaskResult.h
  49. include/alibabacloud/mseap/model/PushRpaTaskDetailRequest.h
  50. include/alibabacloud/mseap/model/PushRpaTaskDetailResult.h
  51. include/alibabacloud/mseap/model/SendNotificationForPartnerRequest.h
  52. include/alibabacloud/mseap/model/SendNotificationForPartnerResult.h
  53. include/alibabacloud/mseap/model/SetRedisValueRequest.h
  54. include/alibabacloud/mseap/model/SetRedisValueResult.h
  55. include/alibabacloud/mseap/model/UpdateAgreementStatusRequest.h
  56. include/alibabacloud/mseap/model/UpdateAgreementStatusResult.h )
  57. set(mseap_src
  58. src/MseapClient.cc
  59. src/model/ActivateLicenseRequest.cc
  60. src/model/ActivateLicenseResult.cc
  61. src/model/CallbackTaskRequest.cc
  62. src/model/CallbackTaskResult.cc
  63. src/model/DescribeAgreementStatusRequest.cc
  64. src/model/DescribeAgreementStatusResult.cc
  65. src/model/GenerateUploadFilePolicyForPartnerRequest.cc
  66. src/model/GenerateUploadFilePolicyForPartnerResult.cc
  67. src/model/GetNodeByFlowIdRequest.cc
  68. src/model/GetNodeByFlowIdResult.cc
  69. src/model/GetNodeByTemplateIdRequest.cc
  70. src/model/GetNodeByTemplateIdResult.cc
  71. src/model/GetPlatformUserInfoForPartnerRequest.cc
  72. src/model/GetPlatformUserInfoForPartnerResult.cc
  73. src/model/GetProxyByTypeRequest.cc
  74. src/model/GetProxyByTypeResult.cc
  75. src/model/GetRedisValueRequest.cc
  76. src/model/GetRedisValueResult.cc
  77. src/model/GetVariableRequest.cc
  78. src/model/GetVariableResult.cc
  79. src/model/IdentifyCodeRequest.cc
  80. src/model/IdentifyCodeResult.cc
  81. src/model/PullRpaModelRequest.cc
  82. src/model/PullRpaModelResult.cc
  83. src/model/PullTaskRequest.cc
  84. src/model/PullTaskResult.cc
  85. src/model/PushRpaTaskRequest.cc
  86. src/model/PushRpaTaskResult.cc
  87. src/model/PushRpaTaskDetailRequest.cc
  88. src/model/PushRpaTaskDetailResult.cc
  89. src/model/SendNotificationForPartnerRequest.cc
  90. src/model/SendNotificationForPartnerResult.cc
  91. src/model/SetRedisValueRequest.cc
  92. src/model/SetRedisValueResult.cc
  93. src/model/UpdateAgreementStatusRequest.cc
  94. src/model/UpdateAgreementStatusResult.cc )
  95. add_library(mseap ${LIB_TYPE}
  96. ${mseap_public_header}
  97. ${mseap_public_header_model}
  98. ${mseap_src})
  99. set_target_properties(mseap
  100. PROPERTIES
  101. LINKER_LANGUAGE CXX
  102. ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  103. LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  104. RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
  105. OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}mseap
  106. )
  107. if(${LIB_TYPE} STREQUAL "SHARED")
  108. set_target_properties(mseap
  109. PROPERTIES
  110. DEFINE_SYMBOL ALIBABACLOUD_MSEAP_LIBRARY)
  111. endif()
  112. target_include_directories(mseap
  113. PRIVATE include
  114. ${CMAKE_SOURCE_DIR}/core/include
  115. )
  116. target_link_libraries(mseap
  117. core)
  118. if(CMAKE_HOST_WIN32)
  119. ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
  120. set(jsoncpp_install_dir ${INSTALL_DIR})
  121. add_dependencies(mseap
  122. jsoncpp)
  123. target_include_directories(mseap
  124. PRIVATE ${jsoncpp_install_dir}/include)
  125. target_link_libraries(mseap
  126. ${jsoncpp_install_dir}/lib/jsoncpp.lib)
  127. set_target_properties(mseap
  128. PROPERTIES
  129. COMPILE_OPTIONS "/bigobj")
  130. else()
  131. target_include_directories(mseap
  132. PRIVATE /usr/include/jsoncpp)
  133. target_link_libraries(mseap
  134. jsoncpp)
  135. endif()
  136. install(FILES ${mseap_public_header}
  137. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/mseap)
  138. install(FILES ${mseap_public_header_model}
  139. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/mseap/model)
  140. install(TARGETS mseap
  141. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  142. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  143. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  144. )