CMakeLists.txt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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(ccc_public_header
  18. include/alibabacloud/ccc/CCCClient.h
  19. include/alibabacloud/ccc/CCCExport.h )
  20. set(ccc_public_header_model
  21. include/alibabacloud/ccc/model/ListRecordingsByContactIdRequest.h
  22. include/alibabacloud/ccc/model/ListRecordingsByContactIdResult.h
  23. include/alibabacloud/ccc/model/ListUsersOfSkillGroupRequest.h
  24. include/alibabacloud/ccc/model/ListUsersOfSkillGroupResult.h
  25. include/alibabacloud/ccc/model/DeleteSkillGroupRequest.h
  26. include/alibabacloud/ccc/model/DeleteSkillGroupResult.h
  27. include/alibabacloud/ccc/model/ModifyPhoneNumberRequest.h
  28. include/alibabacloud/ccc/model/ModifyPhoneNumberResult.h
  29. include/alibabacloud/ccc/model/ListUsersRequest.h
  30. include/alibabacloud/ccc/model/ListUsersResult.h
  31. include/alibabacloud/ccc/model/ListSkillGroupsRequest.h
  32. include/alibabacloud/ccc/model/ListSkillGroupsResult.h
  33. include/alibabacloud/ccc/model/ListSkillGroupsOfUserRequest.h
  34. include/alibabacloud/ccc/model/ListSkillGroupsOfUserResult.h
  35. include/alibabacloud/ccc/model/RemovePhoneNumberRequest.h
  36. include/alibabacloud/ccc/model/RemovePhoneNumberResult.h
  37. include/alibabacloud/ccc/model/ListCallDetailRecordsRequest.h
  38. include/alibabacloud/ccc/model/ListCallDetailRecordsResult.h
  39. include/alibabacloud/ccc/model/AddPhoneNumberRequest.h
  40. include/alibabacloud/ccc/model/AddPhoneNumberResult.h
  41. include/alibabacloud/ccc/model/ListRecordingsRequest.h
  42. include/alibabacloud/ccc/model/ListRecordingsResult.h
  43. include/alibabacloud/ccc/model/GetConfigRequest.h
  44. include/alibabacloud/ccc/model/GetConfigResult.h
  45. include/alibabacloud/ccc/model/DownloadRecordingRequest.h
  46. include/alibabacloud/ccc/model/DownloadRecordingResult.h
  47. include/alibabacloud/ccc/model/ListPhoneNumbersRequest.h
  48. include/alibabacloud/ccc/model/ListPhoneNumbersResult.h
  49. include/alibabacloud/ccc/model/RefreshTokenRequest.h
  50. include/alibabacloud/ccc/model/RefreshTokenResult.h
  51. include/alibabacloud/ccc/model/RequestLoginInfoRequest.h
  52. include/alibabacloud/ccc/model/RequestLoginInfoResult.h
  53. include/alibabacloud/ccc/model/GetServiceExtensionsRequest.h
  54. include/alibabacloud/ccc/model/GetServiceExtensionsResult.h
  55. include/alibabacloud/ccc/model/ListContactFlowsRequest.h
  56. include/alibabacloud/ccc/model/ListContactFlowsResult.h
  57. include/alibabacloud/ccc/model/ListRolesRequest.h
  58. include/alibabacloud/ccc/model/ListRolesResult.h
  59. include/alibabacloud/ccc/model/GetUserRequest.h
  60. include/alibabacloud/ccc/model/GetUserResult.h )
  61. set(ccc_src
  62. src/CCCClient.cc
  63. src/model/ListRecordingsByContactIdRequest.cc
  64. src/model/ListRecordingsByContactIdResult.cc
  65. src/model/ListUsersOfSkillGroupRequest.cc
  66. src/model/ListUsersOfSkillGroupResult.cc
  67. src/model/DeleteSkillGroupRequest.cc
  68. src/model/DeleteSkillGroupResult.cc
  69. src/model/ModifyPhoneNumberRequest.cc
  70. src/model/ModifyPhoneNumberResult.cc
  71. src/model/ListUsersRequest.cc
  72. src/model/ListUsersResult.cc
  73. src/model/ListSkillGroupsRequest.cc
  74. src/model/ListSkillGroupsResult.cc
  75. src/model/ListSkillGroupsOfUserRequest.cc
  76. src/model/ListSkillGroupsOfUserResult.cc
  77. src/model/RemovePhoneNumberRequest.cc
  78. src/model/RemovePhoneNumberResult.cc
  79. src/model/ListCallDetailRecordsRequest.cc
  80. src/model/ListCallDetailRecordsResult.cc
  81. src/model/AddPhoneNumberRequest.cc
  82. src/model/AddPhoneNumberResult.cc
  83. src/model/ListRecordingsRequest.cc
  84. src/model/ListRecordingsResult.cc
  85. src/model/GetConfigRequest.cc
  86. src/model/GetConfigResult.cc
  87. src/model/DownloadRecordingRequest.cc
  88. src/model/DownloadRecordingResult.cc
  89. src/model/ListPhoneNumbersRequest.cc
  90. src/model/ListPhoneNumbersResult.cc
  91. src/model/RefreshTokenRequest.cc
  92. src/model/RefreshTokenResult.cc
  93. src/model/RequestLoginInfoRequest.cc
  94. src/model/RequestLoginInfoResult.cc
  95. src/model/GetServiceExtensionsRequest.cc
  96. src/model/GetServiceExtensionsResult.cc
  97. src/model/ListContactFlowsRequest.cc
  98. src/model/ListContactFlowsResult.cc
  99. src/model/ListRolesRequest.cc
  100. src/model/ListRolesResult.cc
  101. src/model/GetUserRequest.cc
  102. src/model/GetUserResult.cc )
  103. add_library(ccc ${LIB_TYPE}
  104. ${ccc_public_header}
  105. ${ccc_public_header_model}
  106. ${ccc_src})
  107. set_target_properties(ccc
  108. PROPERTIES
  109. LINKER_LANGUAGE CXX
  110. ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  111. LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  112. RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
  113. OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}ccc
  114. )
  115. if(${LIB_TYPE} STREQUAL "SHARED")
  116. set_target_properties(ccc
  117. PROPERTIES
  118. DEFINE_SYMBOL ALIBABACLOUD_CCC_LIBRARY)
  119. endif()
  120. target_include_directories(ccc
  121. PRIVATE include
  122. ${CMAKE_SOURCE_DIR}/core/include
  123. )
  124. target_link_libraries(ccc
  125. core)
  126. if(CMAKE_HOST_WIN32)
  127. ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
  128. set(jsoncpp_install_dir ${INSTALL_DIR})
  129. add_dependencies(ccc
  130. jsoncpp)
  131. target_include_directories(ccc
  132. PRIVATE ${jsoncpp_install_dir}/include)
  133. target_link_libraries(ccc
  134. ${jsoncpp_install_dir}/lib/jsoncpp.lib)
  135. set_target_properties(ccc
  136. PROPERTIES
  137. COMPILE_OPTIONS "/bigobj")
  138. else()
  139. target_include_directories(ccc
  140. PRIVATE /usr/include/jsoncpp)
  141. target_link_libraries(ccc
  142. jsoncpp)
  143. endif()
  144. install(FILES ${ccc_public_header}
  145. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/ccc)
  146. install(FILES ${ccc_public_header_model}
  147. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/ccc/model)
  148. install(TARGETS ccc
  149. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  150. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  151. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  152. )