blob: a7cebb9223756ded639e564e124ee7890035d276 [file] [log] [blame]
Uilian Ries6234e3d2017-06-23 10:34:56 -03001#!/usr/bin/env python
Paul le Rouxb957eb42018-06-19 07:14:46 +02002from conans import ConanFile, CMake
Uilian Ries6234e3d2017-06-23 10:34:56 -03003
4
5class CatchConan(ConanFile):
Uilian Riesac0a83a2018-11-16 09:45:07 -02006 name = "Catch2"
Uilian Ries6234e3d2017-06-23 10:34:56 -03007 description = "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD"
Uilian Riesac0a83a2018-11-16 09:45:07 -02008 topics = ("conan", "catch2", "header-only", "unit-test", "tdd", "bdd")
Martin Hořeňovský44722f92018-06-11 10:48:10 +02009 url = "https://github.com/catchorg/Catch2"
Uilian Riesac0a83a2018-11-16 09:45:07 -020010 homepage = url
11 license = "BSL-1.0"
12 exports = "LICENSE.txt"
13 exports_sources = ("single_include/*", "CMakeLists.txt", "CMake/*", "contrib/*")
14 generators = "cmake"
Paul le Rouxb957eb42018-06-19 07:14:46 +020015
Uilian Ries6234e3d2017-06-23 10:34:56 -030016 def package(self):
Paul le Rouxb957eb42018-06-19 07:14:46 +020017 cmake = CMake(self)
18 cmake.definitions["BUILD_TESTING"] = "OFF"
19 cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF"
Martin Hořeňovský7be8ba32018-07-01 16:21:12 +020020 cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON"
Paul le Rouxb957eb42018-06-19 07:14:46 +020021 cmake.configure()
22 cmake.install()
23
24 self.copy(pattern="LICENSE.txt", dst="licenses")
Martin Hořeňovskýae210202017-10-31 15:17:21 +010025
solvingjeea9e1e2017-08-26 13:53:03 -040026 def package_id(self):
Paul le Rouxb957eb42018-06-19 07:14:46 +020027 self.info.header_only()