Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 1 | #!/usr/bin/env python |
Paul le Roux | b957eb4 | 2018-06-19 07:14:46 +0200 | [diff] [blame] | 2 | from conans import ConanFile, CMake |
Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 3 | |
| 4 | |
| 5 | class CatchConan(ConanFile): |
| 6 | name = "Catch" |
Martin Hořeňovský | 03d122a | 2018-10-26 21:14:16 +0200 | [diff] [blame] | 7 | version = "2.4.2" |
Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 8 | description = "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD" |
| 9 | author = "philsquared" |
| 10 | generators = "cmake" |
Paul le Roux | b957eb4 | 2018-06-19 07:14:46 +0200 | [diff] [blame] | 11 | # 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ý | 44722f9 | 2018-06-11 10:48:10 +0200 | [diff] [blame] | 14 | url = "https://github.com/catchorg/Catch2" |
Phil Nash | 0270afb | 2017-06-28 16:44:46 +0100 | [diff] [blame] | 15 | license = "Boost Software License - Version 1.0. http://www.boost.org/LICENSE_1_0.txt" |
Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 16 | |
Paul le Roux | b957eb4 | 2018-06-19 07:14:46 +0200 | [diff] [blame] | 17 | def build(self): |
| 18 | pass |
| 19 | |
Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 20 | def package(self): |
Paul le Roux | b957eb4 | 2018-06-19 07:14:46 +0200 | [diff] [blame] | 21 | cmake = CMake(self) |
| 22 | cmake.definitions["BUILD_TESTING"] = "OFF" |
| 23 | cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF" |
Martin Hořeňovský | 7be8ba3 | 2018-07-01 16:21:12 +0200 | [diff] [blame] | 24 | cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON" |
Paul le Roux | b957eb4 | 2018-06-19 07:14:46 +0200 | [diff] [blame] | 25 | cmake.configure() |
| 26 | cmake.install() |
| 27 | |
| 28 | self.copy(pattern="LICENSE.txt", dst="licenses") |
Martin Hořeňovský | ae21020 | 2017-10-31 15:17:21 +0100 | [diff] [blame] | 29 | |
solvingj | eea9e1e | 2017-08-26 13:53:03 -0400 | [diff] [blame] | 30 | def package_id(self): |
Paul le Roux | b957eb4 | 2018-06-19 07:14:46 +0200 | [diff] [blame] | 31 | self.info.header_only() |