Skip to content

Commit

Permalink
spdlog: make sure libdirs is empty when header_only=True
Browse files Browse the repository at this point in the history
  • Loading branch information
gegles committed Aug 19, 2023
1 parent cc1e5f0 commit 16bb5b8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion recipes/spdlog/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,10 @@ def package_info(self):
self.cpp_info.components["libspdlog"].defines.append("SPDLOG_FMT_EXTERNAL")
self.cpp_info.components["libspdlog"].requires = ["fmt::fmt"]

if not self.options.header_only:
if self.options.header_only:
self.cpp_info.libdirs = []
self.cpp_info.components["libspdlog"].libdirs = []
else:
suffix = "d" if self.settings.build_type == "Debug" else ""
self.cpp_info.components["libspdlog"].libs = [f"spdlog{suffix}"]
self.cpp_info.components["libspdlog"].defines.append("SPDLOG_COMPILED_LIB")
Expand Down

0 comments on commit 16bb5b8

Please sign in to comment.