mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Conanfile updated to build the static libraries.
This commit is contained in:
parent
4005d87460
commit
21868deeab
24
conanfile.py
24
conanfile.py
@ -10,18 +10,28 @@ class CatchConan(ConanFile):
|
|||||||
homepage = url
|
homepage = url
|
||||||
license = "BSL-1.0"
|
license = "BSL-1.0"
|
||||||
exports = "LICENSE.txt"
|
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"
|
generators = "cmake"
|
||||||
|
|
||||||
def package(self):
|
def _configure_cmake(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
cmake.definitions["BUILD_TESTING"] = "OFF"
|
cmake.definitions["BUILD_TESTING"] = "OFF"
|
||||||
cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF"
|
cmake.definitions["CATCH_INSTALL_DOCS"] = "OFF"
|
||||||
cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON"
|
cmake.definitions["CATCH_INSTALL_HELPERS"] = "ON"
|
||||||
cmake.configure(build_folder='build')
|
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()
|
cmake.install()
|
||||||
|
|
||||||
self.copy(pattern="LICENSE.txt", dst="licenses")
|
def package_info(self):
|
||||||
|
self.cpp_info.libs = ['Catch2Main', 'Catch2']
|
||||||
def package_id(self):
|
self.cpp_info.names["cmake_find_package"] = "Catch2"
|
||||||
self.info.header_only()
|
self.cpp_info.names["cmake_find_package_multi"] = "Catch2"
|
||||||
|
Loading…
Reference in New Issue
Block a user