conanfile.py 1006 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. from conans import ConanFile, CMake
  3. class CatchConan(ConanFile):
  4. name = "Catch2"
  5. description = "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD"
  6. topics = ("conan", "catch2", "header-only", "unit-test", "tdd", "bdd")
  7. url = "https://github.com/catchorg/Catch2"
  8. homepage = url
  9. license = "BSL-1.0"
  10. exports = "LICENSE.txt"
  11. exports_sources = ("single_include/*", "CMakeLists.txt", "CMake/*", "contrib/*", "src/*")
  12. generators = "cmake"
  13. def package(self):
  14. cmake = CMake(self)
  15. cmake.definitions["BUILD_TESTING"] = "OFF"
  16. cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF"
  17. cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON"
  18. cmake.configure(build_folder='build')
  19. cmake.install()
  20. self.copy(pattern="LICENSE.txt", dst="licenses")
  21. def package_id(self):
  22. self.info.header_only()
  23. def package_info(self):
  24. self.cpp_info.builddirs.append("lib/cmake/Catch2")