conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
972 stars 1.79k forks source link

[question] Is libcxx necessary in LasLib/LasZip? #23444

Open memsharded opened 7 months ago

memsharded commented 7 months ago

What is your question?

This would be a question for @CJaccarino

I am checking the code in LasLib/LasZip packages that contain:

      if not self.options.shared:
            libcxx = stdcpp_library(self)
            if libcxx:
                self.cpp_info.system_libs.append(libcxx)

And I was wondering why it was necessary. The libraries seems to be C++. Do you recall why this was added to the recipes? Many thanks!

valgur commented 7 months ago

LasZip is implemented in C++ but provides provides a C API, so the C++ library needs to be explicitly listed for pure-C consuming projects.

It should not be there for LasLib, though.

memsharded commented 7 months ago

This https://github.com/LAStools/LAStools/blob/master/LASzip/dll/laszip_api.h, isn't it? I didn't find on my first look, so I was confused.

Also LasZip is not only the C headers, it also makes public the C++ header, isn't it?

valgur commented 7 months ago

The C API header you linked to is the only one exported and there's no separate one for C++ provided in LasZip.