2017-06-23 09:34:56 -04:00
|
|
|
#!/usr/bin/env python
|
2018-06-19 01:14:46 -04:00
|
|
|
from conans import ConanFile, CMake
|
2017-06-23 09:34:56 -04:00
|
|
|
|
|
|
|
|
|
|
|
class CatchConan(ConanFile):
|
2018-11-16 06:45:07 -05:00
|
|
|
name = "Catch2"
|
2017-06-23 09:34:56 -04:00
|
|
|
description = "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD"
|
2018-11-16 06:45:07 -05:00
|
|
|
topics = ("conan", "catch2", "header-only", "unit-test", "tdd", "bdd")
|
2018-06-11 04:48:10 -04:00
|
|
|
url = "https://github.com/catchorg/Catch2"
|
2018-11-16 06:45:07 -05:00
|
|
|
homepage = url
|
|
|
|
license = "BSL-1.0"
|
|
|
|
exports = "LICENSE.txt"
|
|
|
|
exports_sources = ("single_include/*", "CMakeLists.txt", "CMake/*", "contrib/*")
|
|
|
|
generators = "cmake"
|
2018-06-19 01:14:46 -04:00
|
|
|
|
2017-06-23 09:34:56 -04:00
|
|
|
def package(self):
|
2018-06-19 01:14:46 -04:00
|
|
|
cmake = CMake(self)
|
|
|
|
cmake.definitions["BUILD_TESTING"] = "OFF"
|
|
|
|
cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF"
|
2018-07-01 10:21:12 -04:00
|
|
|
cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON"
|
2019-05-23 08:29:45 -04:00
|
|
|
cmake.configure(build_folder='build')
|
2018-06-19 01:14:46 -04:00
|
|
|
cmake.install()
|
|
|
|
|
|
|
|
self.copy(pattern="LICENSE.txt", dst="licenses")
|
2017-10-31 10:17:21 -04:00
|
|
|
|
2017-08-26 13:53:03 -04:00
|
|
|
def package_id(self):
|
2018-06-19 01:14:46 -04:00
|
|
|
self.info.header_only()
|
2020-04-07 07:19:25 -04:00
|
|
|
|
|
|
|
def package_info(self):
|
|
|
|
self.cpp_info.builddirs.append("lib/cmake/Catch2")
|