CMakeLists.txt 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. if(CMAKE_HOST_WIN32)
  17. ExternalProject_Add(jsoncpp
  18. URL ${CMAKE_CURRENT_SOURCE_DIR}/jsoncpp-0.10.5.tar.gz
  19. URL_HASH MD5=db146bac5a126ded9bd728ab7b61ed6b
  20. CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
  21. -DJSONCPP_WITH_TESTS=OFF
  22. -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF
  23. -DJSONCPP_WITH_WARNING_AS_ERROR=OFF
  24. -DJSONCPP_WITH_PKGCONFIG_SUPPORT=OFF
  25. -DJSONCPP_WITH_CMAKE_PACKAGE=OFF
  26. -DBUILD_SHARED_LIBS=OFF
  27. -DBUILD_STATIC_LIBS=ON
  28. )
  29. ExternalProject_Add(curl
  30. URL ${CMAKE_CURRENT_SOURCE_DIR}/curl-7.55.1.tar.gz
  31. URL_HASH MD5=3b832160a8c9c40075fd71191960307c
  32. CMAKE_ARGS -DBUILD_CURL_EXE=OFF
  33. -DBUILD_TESTING=OFF
  34. -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
  35. -DCMAKE_USE_WINSSL=ON
  36. -DCURL_STATICLIB=ON
  37. -DENABLE_MANUAL=OFF
  38. -DHTTP_ONLY=ON
  39. )
  40. endif()
  41. ExternalProject_Add(catch
  42. URL ${CMAKE_CURRENT_SOURCE_DIR}/catch-2.0.1.hpp
  43. URL_HASH MD5=9b3d2cb5c0f9532cddfbbfd0a622f0af
  44. DOWNLOAD_COMMAND ""
  45. CONFIGURE_COMMAND ""
  46. BUILD_COMMAND ""
  47. INSTALL_COMMAND
  48. ${CMAKE_COMMAND} -E copy_if_different
  49. ${CMAKE_CURRENT_SOURCE_DIR}/catch-2.0.1.hpp <INSTALL_DIR>/catch.hpp
  50. )