CMakeLists.txt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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(idaas-doraemon_public_header
  18. include/alibabacloud/idaas-doraemon/Idaas_doraemonClient.h
  19. include/alibabacloud/idaas-doraemon/Idaas_doraemonExport.h )
  20. set(idaas-doraemon_public_header_model
  21. include/alibabacloud/idaas-doraemon/model/CreateAuthenticatorRegistrationRequest.h
  22. include/alibabacloud/idaas-doraemon/model/CreateAuthenticatorRegistrationResult.h
  23. include/alibabacloud/idaas-doraemon/model/CreateUserAuthenticateOptionsRequest.h
  24. include/alibabacloud/idaas-doraemon/model/CreateUserAuthenticateOptionsResult.h
  25. include/alibabacloud/idaas-doraemon/model/DeregisterAuthenticatorRequest.h
  26. include/alibabacloud/idaas-doraemon/model/DeregisterAuthenticatorResult.h
  27. include/alibabacloud/idaas-doraemon/model/FetchAccessTokenRequest.h
  28. include/alibabacloud/idaas-doraemon/model/FetchAccessTokenResult.h
  29. include/alibabacloud/idaas-doraemon/model/GetAuthenticatorRequest.h
  30. include/alibabacloud/idaas-doraemon/model/GetAuthenticatorResult.h
  31. include/alibabacloud/idaas-doraemon/model/ListAuthenticationLogsRequest.h
  32. include/alibabacloud/idaas-doraemon/model/ListAuthenticationLogsResult.h
  33. include/alibabacloud/idaas-doraemon/model/ListAuthenticatorOpsLogsRequest.h
  34. include/alibabacloud/idaas-doraemon/model/ListAuthenticatorOpsLogsResult.h
  35. include/alibabacloud/idaas-doraemon/model/ListAuthenticatorsRequest.h
  36. include/alibabacloud/idaas-doraemon/model/ListAuthenticatorsResult.h
  37. include/alibabacloud/idaas-doraemon/model/ListPwnedPasswordsRequest.h
  38. include/alibabacloud/idaas-doraemon/model/ListPwnedPasswordsResult.h
  39. include/alibabacloud/idaas-doraemon/model/ListUsersRequest.h
  40. include/alibabacloud/idaas-doraemon/model/ListUsersResult.h
  41. include/alibabacloud/idaas-doraemon/model/RegisterAuthenticatorRequest.h
  42. include/alibabacloud/idaas-doraemon/model/RegisterAuthenticatorResult.h
  43. include/alibabacloud/idaas-doraemon/model/ServiceInvokeRequest.h
  44. include/alibabacloud/idaas-doraemon/model/ServiceInvokeResult.h
  45. include/alibabacloud/idaas-doraemon/model/UpdateAuthenticatorAttributeRequest.h
  46. include/alibabacloud/idaas-doraemon/model/UpdateAuthenticatorAttributeResult.h
  47. include/alibabacloud/idaas-doraemon/model/VerifyIdTokenRequest.h
  48. include/alibabacloud/idaas-doraemon/model/VerifyIdTokenResult.h
  49. include/alibabacloud/idaas-doraemon/model/VerifyUserAuthenticationRequest.h
  50. include/alibabacloud/idaas-doraemon/model/VerifyUserAuthenticationResult.h )
  51. set(idaas-doraemon_src
  52. src/Idaas-doraemonClient.cc
  53. src/model/CreateAuthenticatorRegistrationRequest.cc
  54. src/model/CreateAuthenticatorRegistrationResult.cc
  55. src/model/CreateUserAuthenticateOptionsRequest.cc
  56. src/model/CreateUserAuthenticateOptionsResult.cc
  57. src/model/DeregisterAuthenticatorRequest.cc
  58. src/model/DeregisterAuthenticatorResult.cc
  59. src/model/FetchAccessTokenRequest.cc
  60. src/model/FetchAccessTokenResult.cc
  61. src/model/GetAuthenticatorRequest.cc
  62. src/model/GetAuthenticatorResult.cc
  63. src/model/ListAuthenticationLogsRequest.cc
  64. src/model/ListAuthenticationLogsResult.cc
  65. src/model/ListAuthenticatorOpsLogsRequest.cc
  66. src/model/ListAuthenticatorOpsLogsResult.cc
  67. src/model/ListAuthenticatorsRequest.cc
  68. src/model/ListAuthenticatorsResult.cc
  69. src/model/ListPwnedPasswordsRequest.cc
  70. src/model/ListPwnedPasswordsResult.cc
  71. src/model/ListUsersRequest.cc
  72. src/model/ListUsersResult.cc
  73. src/model/RegisterAuthenticatorRequest.cc
  74. src/model/RegisterAuthenticatorResult.cc
  75. src/model/ServiceInvokeRequest.cc
  76. src/model/ServiceInvokeResult.cc
  77. src/model/UpdateAuthenticatorAttributeRequest.cc
  78. src/model/UpdateAuthenticatorAttributeResult.cc
  79. src/model/VerifyIdTokenRequest.cc
  80. src/model/VerifyIdTokenResult.cc
  81. src/model/VerifyUserAuthenticationRequest.cc
  82. src/model/VerifyUserAuthenticationResult.cc )
  83. add_library(idaas-doraemon ${LIB_TYPE}
  84. ${idaas-doraemon_public_header}
  85. ${idaas-doraemon_public_header_model}
  86. ${idaas-doraemon_src})
  87. set_target_properties(idaas-doraemon
  88. PROPERTIES
  89. LINKER_LANGUAGE CXX
  90. ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  91. LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
  92. RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
  93. OUTPUT_NAME ${TARGET_OUTPUT_NAME_PREFIX}idaas-doraemon
  94. )
  95. if(${LIB_TYPE} STREQUAL "SHARED")
  96. set_target_properties(idaas-doraemon
  97. PROPERTIES
  98. DEFINE_SYMBOL ALIBABACLOUD_IDAAS_DORAEMON_LIBRARY)
  99. endif()
  100. target_include_directories(idaas-doraemon
  101. PRIVATE include
  102. ${CMAKE_SOURCE_DIR}/core/include
  103. )
  104. target_link_libraries(idaas-doraemon
  105. core)
  106. if(CMAKE_HOST_WIN32)
  107. ExternalProject_Get_Property(jsoncpp INSTALL_DIR)
  108. set(jsoncpp_install_dir ${INSTALL_DIR})
  109. add_dependencies(idaas-doraemon
  110. jsoncpp)
  111. target_include_directories(idaas-doraemon
  112. PRIVATE ${jsoncpp_install_dir}/include)
  113. target_link_libraries(idaas-doraemon
  114. ${jsoncpp_install_dir}/lib/jsoncpp.lib)
  115. set_target_properties(idaas-doraemon
  116. PROPERTIES
  117. COMPILE_OPTIONS "/bigobj")
  118. else()
  119. target_include_directories(idaas-doraemon
  120. PRIVATE /usr/include/jsoncpp)
  121. target_link_libraries(idaas-doraemon
  122. jsoncpp)
  123. endif()
  124. install(FILES ${idaas-doraemon_public_header}
  125. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/idaas-doraemon)
  126. install(FILES ${idaas-doraemon_public_header_model}
  127. DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/alibabacloud/idaas-doraemon/model)
  128. install(TARGETS idaas-doraemon
  129. ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
  130. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  131. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
  132. )