Skip to content

Commit

Permalink
(#24144) abseil: support shared on msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
jcar87 authored May 28, 2024
1 parent 950d544 commit 8303477
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions recipes/abseil/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def validate(self):
f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support."
)

if self.options.shared and is_msvc(self):
if self.options.shared and is_msvc(self) and Version(self.version) < "20230802.1":
# upstream tries its best to export symbols, but it's broken for the moment
raise ConanInvalidConfiguration(f"{self.ref} shared not availabe for Visual Studio (yet)")
raise ConanInvalidConfiguration(f"{self.ref} shared not availabe for Visual Studio, please use version 20230802.1 or newer")

def layout(self):
cmake_layout(self, src_folder="src")
Expand Down Expand Up @@ -161,7 +161,7 @@ def _load_components_from_cmake_target_file(self, absl_target_file_path):
if cmake_function_name == "add_library":
cmake_imported_target_type = cmake_function_args[1]
if cmake_imported_target_type in ["STATIC", "SHARED"]:
components[potential_lib_name]["libs"] = [potential_lib_name] if cmake_target_nonamespace != "abseil_dll" else []
components[potential_lib_name]["libs"] = [potential_lib_name] if cmake_target_nonamespace != "abseil_dll" else ['abseil_dll']
elif cmake_function_name == "set_target_properties":
target_properties = re.findall(r"(?P<property>INTERFACE_COMPILE_DEFINITIONS|INTERFACE_INCLUDE_DIRECTORIES|INTERFACE_LINK_LIBRARIES)[\n|\s]+(?P<values>.+)", cmake_function_args[2])
for target_property in target_properties:
Expand Down

0 comments on commit 8303477

Please sign in to comment.