blob: b99f314d7e19c7eb13a9eb6fb9387adb45e02092 [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):
6 name = "Catch"
Martin Hořeňovský03d122a2018-10-26 21:14:16 +02007 version = "2.4.2"
Uilian Ries6234e3d2017-06-23 10:34:56 -03008 description = "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD"
9 author = "philsquared"
10 generators = "cmake"
Paul le Rouxb957eb42018-06-19 07:14:46 +020011 # Only needed until conan 1.5 is released
12 settings = "compiler", "arch"
13 exports_sources = "single_include/*", "CMakeLists.txt", "CMake/catch2.pc.in", "LICENSE.txt"
Martin Hořeňovský44722f92018-06-11 10:48:10 +020014 url = "https://github.com/catchorg/Catch2"
Phil Nash0270afb2017-06-28 16:44:46 +010015 license = "Boost Software License - Version 1.0. http://www.boost.org/LICENSE_1_0.txt"
Uilian Ries6234e3d2017-06-23 10:34:56 -030016
Paul le Rouxb957eb42018-06-19 07:14:46 +020017 def build(self):
18 pass
19
Uilian Ries6234e3d2017-06-23 10:34:56 -030020 def package(self):
Paul le Rouxb957eb42018-06-19 07:14:46 +020021 cmake = CMake(self)
22 cmake.definitions["BUILD_TESTING"] = "OFF"
23 cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF"
Martin Hořeňovský7be8ba32018-07-01 16:21:12 +020024 cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON"
Paul le Rouxb957eb42018-06-19 07:14:46 +020025 cmake.configure()
26 cmake.install()
27
28 self.copy(pattern="LICENSE.txt", dst="licenses")
Martin Hořeňovskýae210202017-10-31 15:17:21 +010029
solvingjeea9e1e2017-08-26 13:53:03 -040030 def package_id(self):
Paul le Rouxb957eb42018-06-19 07:14:46 +020031 self.info.header_only()