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 150165d commit a642934
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions conanfile.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
from conans import ConanFile
from conans import ConanFile, CMake

class GslLiteConan(ConanFile):
version = "0.34.0"
name = "gsl-lite"
description = "A single-file header-only version of ISO C++ Guidelines Support Library (GSL) for C++98, C++11 and later"
license = "MIT License. https://opensource.org/licenses/MIT"
url = "https://github.com/martinmoene/gsl-lite.git"
exports_sources = "include/gsl/*", "include/*", "LICENSE"
build_policy = "missing"
exports_sources = "include/gsl/*", "CMakeLists.txt", "cmake/*", "LICENSE"
build_policy = "missing"
author = "Martin Moene"

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

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

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

0 comments on commit a642934

Please sign in to comment.