Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authoroffa2020-01-14 19:36:36 +0100
committerMartin Hořeňovský2020-01-19 14:59:33 +0100
commit21868deeab14df878fdd26f53806954db2922837 (patch)
tree75399c480b47e9d4cd98ab036ad125905d86389c
parent4005d87460cbcda69532fc04cbbef4e4bf0f7616 (diff)
downloadcatch3-21868deeab14df878fdd26f53806954db2922837.tar.gz
Conanfile updated to build the static libraries.
-rw-r--r--conanfile.py22
1 files changed, 16 insertions, 6 deletions
diff --git a/conanfile.py b/conanfile.py
index 8d407baf..56175c41 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -10,18 +10,28 @@ class CatchConan(ConanFile):
homepage = url
license = "BSL-1.0"
exports = "LICENSE.txt"
- exports_sources = ("single_include/*", "CMakeLists.txt", "CMake/*", "contrib/*")
+ exports_sources = ("src/*", "CMakeLists.txt", "CMake/*", "extras/*")
+ settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
- def package(self):
+ def _configure_cmake(self):
cmake = CMake(self)
cmake.definitions["BUILD_TESTING"] = "OFF"
cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF"
cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON"
- cmake.configure(build_folder='build')
- cmake.install()
+ cmake.configure(build_folder="build")
+ return cmake
+
+ def build(self):
+ cmake = self._configure_cmake()
+ cmake.build()
+ def package(self):
self.copy(pattern="LICENSE.txt", dst="licenses")
+ cmake = self._configure_cmake()
+ cmake.install()
- def package_id(self):
- self.info.header_only()
+ def package_info(self):
+ self.cpp_info.libs = ['Catch2Main', 'Catch2']
+ self.cpp_info.names["cmake_find_package"] = "Catch2"
+ self.cpp_info.names["cmake_find_package_multi"] = "Catch2"