Skip to content

Commit 2aec606

Browse files
committed
Implement PDB file copying for Windows builds
Added functionality to copy PDB files to the Conan package for Windows.
1 parent 63dc5a7 commit 2aec606

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

conanfile.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import pathlib
66
import subprocess
77
from rules_support import PluginBranchInfo
8+
from conans import tools
9+
import shutil
810

911
class EphysDataConan(ConanFile):
1012
"""Class to package plugin using conan
@@ -152,6 +154,17 @@ def package(self):
152154
release_dir,
153155
]
154156
)
157+
158+
# Add the PDB files to the Conan package
159+
if self.settings.os == "Windows":
160+
print("Copying PDBs...")
161+
pdb_dest = pathlib.Path(package_dir, "RelWithDebInfo", "PDBs")
162+
pdb_dest.mkdir()
163+
pdb_files = pdb_files = [p for p in pathlib.Path(self.build_folder).rglob('*') if p.is_file() and p.suffix.lower() == '.pdb']
164+
print("PDB(s): ", pdb_files)
165+
for pfile in pdb_files:
166+
shutil.copy(pfile, pdb_dest)
167+
155168
self.copy(pattern="*", src=package_dir)
156169

157170
def package_id(self):

0 commit comments

Comments
 (0)