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): |
Uilian Ries | ac0a83a | 2018-11-16 09:45:07 -0200 | [diff] [blame] | 6 | name = "Catch2" |
Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 7 | description = "A modern, C++-native, header-only, framework for unit-tests, TDD and BDD" |
Uilian Ries | ac0a83a | 2018-11-16 09:45:07 -0200 | [diff] [blame] | 8 | topics = ("conan", "catch2", "header-only", "unit-test", "tdd", "bdd") |
Martin Hořeňovský | 44722f9 | 2018-06-11 10:48:10 +0200 | [diff] [blame] | 9 | url = "https://github.com/catchorg/Catch2" |
Uilian Ries | ac0a83a | 2018-11-16 09:45:07 -0200 | [diff] [blame] | 10 | 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 Roux | b957eb4 | 2018-06-19 07:14:46 +0200 | [diff] [blame] | 15 | |
Uilian Ries | 6234e3d | 2017-06-23 10:34:56 -0300 | [diff] [blame] | 16 | def package(self): |
Paul le Roux | b957eb4 | 2018-06-19 07:14:46 +0200 | [diff] [blame] | 17 | cmake = CMake(self) |
| 18 | cmake.definitions["BUILD_TESTING"] = "OFF" |
| 19 | cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF" |
Martin Hořeňovský | 7be8ba3 | 2018-07-01 16:21:12 +0200 | [diff] [blame] | 20 | cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON" |
Martin Hořeňovský | 90378f4 | 2019-05-23 14:29:45 +0200 | [diff] [blame] | 21 | cmake.configure(build_folder='build') |
Paul le Roux | b957eb4 | 2018-06-19 07:14:46 +0200 | [diff] [blame] | 22 | cmake.install() |
| 23 | |
| 24 | self.copy(pattern="LICENSE.txt", dst="licenses") |
Martin Hořeňovský | ae21020 | 2017-10-31 15:17:21 +0100 | [diff] [blame] | 25 | |
solvingj | eea9e1e | 2017-08-26 13:53:03 -0400 | [diff] [blame] | 26 | def package_id(self): |
Paul le Roux | b957eb4 | 2018-06-19 07:14:46 +0200 | [diff] [blame] | 27 | self.info.header_only() |