CMakeLists.txt 5.3 KB

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