httplibConfig.cmake.in 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. # Generates a macro to auto-configure everything
  2. @PACKAGE_INIT@
  3. # Setting these here so they're accessible after install.
  4. # Might be useful for some users to check which settings were used.
  5. set(HTTPLIB_IS_USING_OPENSSL @HTTPLIB_IS_USING_OPENSSL@)
  6. set(HTTPLIB_IS_USING_ZLIB @HTTPLIB_IS_USING_ZLIB@)
  7. set(HTTPLIB_IS_COMPILED @HTTPLIB_COMPILE@)
  8. include(CMakeFindDependencyMacro)
  9. # We add find_dependency calls here to not make the end-user have to call them.
  10. find_dependency(Threads REQUIRED)
  11. if(@HTTPLIB_IS_USING_OPENSSL@)
  12. # OpenSSL COMPONENTS were added in Cmake v3.11
  13. if(CMAKE_VERSION VERSION_LESS "3.11")
  14. find_dependency(OpenSSL @_HTTPLIB_OPENSSL_MIN_VER@ REQUIRED)
  15. else()
  16. # Once the COMPONENTS were added, they were made optional when not specified.
  17. # Since we use both, we need to search for both.
  18. find_dependency(OpenSSL @_HTTPLIB_OPENSSL_MIN_VER@ COMPONENTS Crypto SSL REQUIRED)
  19. endif()
  20. endif()
  21. if(@HTTPLIB_IS_USING_ZLIB@)
  22. find_dependency(ZLIB REQUIRED)
  23. endif()
  24. # Lets the end-user find the header path if needed
  25. # This is helpful if you're using Cmake's pre-compiled header feature
  26. set_and_check(HTTPLIB_HEADER_PATH "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/httplib.h")
  27. # Brings in the target library
  28. include("${CMAKE_CURRENT_LIST_DIR}/httplibTargets.cmake")