Skip to content

Commit

Permalink
Adding info.clear if static
Browse files Browse the repository at this point in the history
  • Loading branch information
franramirez688 committed May 9, 2024
1 parent 7b8cab7 commit c58c578
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion recipes/yomm2/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ def build(self):
cmake.configure()
cmake.build()

def package_id(self):
# if yomm2 is built as static, it behaves as a header-only one
if not self.info.options.shared:
self.info.clear()

def package(self):
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
cmake = CMake(self)
Expand All @@ -105,6 +110,6 @@ def package_info(self):
self.cpp_info.set_property("cmake_target_name", "YOMM2::yomm2")
if self.options.shared:
self.cpp_info.libs = ["yomm2"]
else: # header-only one
else: # static == header-only
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []

0 comments on commit c58c578

Please sign in to comment.