66import pathlib
77import subprocess
88from rules_support import PluginBranchInfo
9+ from conans import tools
10+ import shutil
911
1012class PcaPluginConan (ConanFile ):
1113 """Class to package the PcaPluginPlugin using conan
@@ -151,6 +153,17 @@ def package(self):
151153 release_dir ,
152154 ]
153155 )
156+
157+ # Add the PDB files to the Conan package
158+ if self .settings .os == "Windows" :
159+ print ("Copying PDBs..." )
160+ pdb_dest = pathlib .Path (package_dir , "RelWithDebInfo" , "PDBs" )
161+ pdb_dest .mkdir ()
162+ pdb_files = pdb_files = [p for p in pathlib .Path (self .build_folder ).rglob ('*' ) if p .is_file () and p .suffix .lower () == '.pdb' ]
163+ print ("PDB(s): " , pdb_files )
164+ for pfile in pdb_files :
165+ shutil .copy (pfile , pdb_dest )
166+
154167 self .copy (pattern = "*" , src = package_dir )
155168
156169 def package_info (self ):
@@ -159,4 +172,4 @@ def package_info(self):
159172 self .cpp_info .relwithdebinfo .includedirs = ["RelWithDebInfo/include" , "RelWithDebInfo" ]
160173 self .cpp_info .release .libdirs = ["Release/lib" ]
161174 self .cpp_info .release .bindirs = ["Release/Plugins" , "Release" ]
162- self .cpp_info .release .includedirs = ["Release/include" , "Release" ]
175+ self .cpp_info .release .includedirs = ["Release/include" , "Release" ]
0 commit comments