Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boost Conan 2.0 compatibility #16222

Closed
wants to merge 8 commits into from
Closed
Prev Previous commit
Next Next commit
Use b2 install to copy files to package folder
  • Loading branch information
System-Arch committed Feb 24, 2023
commit 4eb23a23b0c6f10959e0339bbd7fed70875b0f74
18 changes: 12 additions & 6 deletions recipes/boost/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1360,14 +1360,20 @@ def _toolset_tag(self):
def package(self):
copy(self, "LICENSE_1_0.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))

# src/boost contains all of the header files
copy(self, "*", src=os.path.join(self.source_folder, "boost"),
dst=os.path.join(self.package_folder, "include", "boost"))
# Use b2 install to move files to package folder
b2_flags = " ".join(self._build_flags)
full_command = f"{self._b2_exe} {b2_flags}"
full_command += f' --debug-configuration --build-dir="{self.build_folder}" install --prefix="{self.package_folder}"'

sources = os.path.join(self.source_folder, self._bcp_dir) if self._use_bcp else self.source_folder
with chdir(self, sources):
# To show the libraries *1
# self.run("%s --show-libraries" % b2_exe)
self.run(full_command)

if not self.options.header_only:
# stage/lib is in source folder and contains the libs that were built
copy(self, "*", src=os.path.join(self.source_folder, "stage", "lib"),
dst=os.path.join(self.package_folder, "lib"))
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))

if self.settings.os == "Emscripten" and not self.options.header_only:
self._create_emscripten_libs()

Expand Down