Skip to content

Commit

Permalink
wil: correct package_info and msvc version
Browse files Browse the repository at this point in the history
review mistakes from #16701 (comment)
  • Loading branch information
prince-chrismc authored Apr 13, 2023
1 parent 4de2dfb commit 9ac8ac9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions recipes/wil/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,20 @@ def _min_cppstd(self):

@property
def _compilers_minimum_version(self):
# About compiler version: https://github.com/microsoft/wil/issues/207#issuecomment-991722592
return {
"Visual Studio": "15",
"msvc": "14.1"
"msvc": "191"
}

# About compiler version: https://github.com/microsoft/wil/issues/207#issuecomment-991722592
def export_sources(self):
export_conandata_patches(self)

def layout(self):
basic_layout(self, src_folder="src")

# same package ID for any package
def package_id(self):
self.info.clear()
self.info.clear() # same package ID for any package

def validate(self):
if self.settings.compiler.get_safe("cppstd"):
Expand Down Expand Up @@ -83,11 +82,11 @@ def package_info(self):
self.cpp_info.libdirs = []

# https://github.com/microsoft/wil/blob/56e3e5aa79234f8de3ceeeaf05b715b823bc2cca/CMakeLists.txt#L53
self.cpp_info.set_property("cmake_file_name", "WIL")
self.cpp_info.set_property("cmake_file_name", "wil")
self.cpp_info.set_property("cmake_target_name", "WIL::WIL")

# TODO: to remove in conan v2 once cmake_find_package_* generators removed
self.cpp_info.filenames["cmake_find_package"] = "WIL"
self.cpp_info.filenames["cmake_find_package_multi"] = "WIL"
self.cpp_info.filenames["cmake_find_package"] = "wil"
self.cpp_info.filenames["cmake_find_package_multi"] = "wil"
self.cpp_info.names["cmake_find_package"] = "WIL"
self.cpp_info.names["cmake_find_package_multi"] = "WIL"
2 changes: 1 addition & 1 deletion recipes/wil/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.8)
project(test_package LANGUAGES CXX)

find_package(WIL REQUIRED CONFIG)
find_package(wil REQUIRED CONFIG)

add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE WIL::WIL)
Expand Down

0 comments on commit 9ac8ac9

Please sign in to comment.