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 6c448e5
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
@@ -1,12 +1,12 @@
from conans import ConanFile
from conans import ConanFile, CMake

class VariantLiteConan(ConanFile):
version = "1.1.0"
name = "variant-lite"
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 6c448e5

Please sign in to comment.