mirror of
https://github.com/conan-io/conan-center-index.git
synced 2025-06-25 04:43:19 +00:00

* influxdb-cpp: migrate to Conan v2 * influxdb-cpp: add check_min_cppstd for C++11 * influxdb-cpp: restore test_v1_package * influxdb-cpp: add cmake_find_package_multi generator to test_v1_package * Update recipes/influxdb-cpp/all/test_v1_package/conanfile.py --------- Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
49 lines
1.4 KiB
Python
49 lines
1.4 KiB
Python
import os
|
|
|
|
from conan import ConanFile
|
|
from conan.tools.build import check_min_cppstd
|
|
from conan.tools.files import copy, get
|
|
from conan.tools.layout import basic_layout
|
|
|
|
required_conan_version = ">=1.52.0"
|
|
|
|
|
|
class InfluxDBCppConan(ConanFile):
|
|
name = "influxdb-cpp"
|
|
description = "C++ client for InfluxDB."
|
|
license = "MIT"
|
|
url = "https://github.com/conan-io/conan-center-index"
|
|
homepage = "https://github.com/orca-zhang/influxdb-cpp"
|
|
topics = ("single-header-lib", "influxdb", "header-only")
|
|
|
|
package_type = "header-library"
|
|
settings = "os", "arch", "compiler", "build_type"
|
|
no_copy_source = True
|
|
|
|
def layout(self):
|
|
basic_layout(self, src_folder="src")
|
|
|
|
def package_id(self):
|
|
self.info.clear()
|
|
|
|
@property
|
|
def _min_cppstd(self):
|
|
return 11
|
|
|
|
def validate(self):
|
|
if self.settings.compiler.cppstd:
|
|
check_min_cppstd(self, self._min_cppstd)
|
|
|
|
def source(self):
|
|
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
|
|
|
def package(self):
|
|
copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
|
|
copy(self, "influxdb.hpp", dst=os.path.join(self.package_folder, "include"), src=self.source_folder)
|
|
|
|
def package_info(self):
|
|
self.cpp_info.bindirs = []
|
|
self.cpp_info.libdirs = []
|
|
if self.settings.os == "Windows":
|
|
self.cpp_info.system_libs = ["ws2_32"]
|