Skip to content

Commit ecb2975

Browse files
authored
fix detection of c++14 (#442)
1 parent aa6cdf7 commit ecb2975

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

conanfile.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from conan import ConanFile
22
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
3+
from conan.tools.build import valid_max_cppstd
34
from conan.tools.files import load
45
from conan.tools.apple import is_apple_os
56
import os
@@ -43,13 +44,13 @@ def configure(self):
4344
self.options[lib].shared = True
4445

4546
def _xtensor_requires(self):
46-
if self.settings.compiler.cppstd in ["14", "gnu14"]:
47+
if valid_max_cppstd(self, 14, False):
4748
return 'xtensor/[>=0.24.3 <0.26.0]'
4849

4950
return 'xtensor/[>=0.24.3]'
5051

5152
def _grpc_requires(self):
52-
if self.settings.compiler.cppstd in ["14", "gnu14"]:
53+
if valid_max_cppstd(self, 14, False):
5354
return 'grpc/[>=1.48.4 <1.70.0]'
5455

5556
return 'grpc/[>=1.48.4]'
@@ -116,6 +117,8 @@ def package_info(self):
116117

117118
if self.settings.os in ["Linux", "FreeBSD"]:
118119
self.cpp_info.components["viamsdk"].system_libs.extend(["dl", "rt"])
120+
elif self.settings.os == "Windows":
121+
self.cpp_info.components["viamsdk"].system_libs.extend(["ncrypt", "secur32", "ntdll", "userenv"])
119122

120123
self.cpp_info.components["viamapi"].includedirs.append("include/viam/api")
121124

0 commit comments

Comments
 (0)