Skip to content

Commit

Permalink
Improve conan/cmake interoperation (nonstd-lite issue 32)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmoene committed Apr 18, 2019
1 parent 2f2cce3 commit 6e246c9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ class StringViewLiteConan(ConanFile):
description = "string-view"
license = "Boost Software License - Version 1.0. http://www.boost.org/LICENSE_1_0.txt"
url = "https://github.com/martinmoene/string-view-lite.git"
exports_sources = "include/nonstd/*", "LICENSE.txt"
build_policy = "missing"
exports_sources = "include/nonstd/*", "CMakeLists.txt", "cmake/*", "LICENSE.txt"
build_policy = "missing"
author = "Martin Moene"

def build(self):
"""Avoid warning on build step"""
pass

def package(self):
"""Provide pkg/include/nonstd/*.hpp"""
self.copy("*.hpp")
"""Run CMake install"""
cmake = CMake(self)
cmake.definitions["STRINGVIEW_LITE_OPT_BUILD_TESTS"] = "OFF"
cmake.definitions["STRINGVIEW_LITE_OPT_BUILD_EXAMPLES"] = "OFF"
cmake.configure()
cmake.install()

def package_info(self):
self.info.header_only()

0 comments on commit 6e246c9

Please sign in to comment.