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 94e2844 commit 9c549e5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class VariantLiteConan(ConanFile):
description = "A single-file header-only version of a C++17-like variant, a type-safe union for C++98, C++11 and later"
license = "Boost Software License - Version 1.0. http://www.boost.org/LICENSE_1_0.txt"
url = "https://github.com/martinmoene/variant-lite.git"
exports_sources = "include/nonstd/*", "LICENSE.txt"
exports_sources = "include/nonstd/*", "CMakeLists.txt", "cmake/*", "LICENSE.txt"
build_policy = "missing"
author = "Martin Moene"

Expand All @@ -15,8 +15,12 @@ def build(self):
pass

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

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

0 comments on commit 9c549e5

Please sign in to comment.