diff --git a/CMakeLists.txt b/CMakeLists.txt index 6377671..c62ff3b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ if(MSVC) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:LIBCMT") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG") endif(MSVC) # ----------------------------------------------------------------------------- diff --git a/conanfile.py b/conanfile.py index 824d217..d024f5e 100644 --- a/conanfile.py +++ b/conanfile.py @@ -5,6 +5,8 @@ import pathlib import subprocess from rules_support import PluginBranchInfo +from conans import tools +import shutil class ChartLegendViewPluginConan(ConanFile): """Class to package ChartLegendViewPlugin plugin using conan @@ -140,6 +142,17 @@ def package(self): release_dir, ] ) + + # Add the PDB files to the Conan package + if self.settings.os == "Windows": + print("Copying PDBs...") + pdb_dest = pathlib.Path(package_dir, "RelWithDebInfo", "PDBs") + pdb_dest.mkdir() + pdb_files = pdb_files = [p for p in pathlib.Path(self.build_folder).rglob('*') if p.is_file() and p.suffix.lower() == '.pdb'] + print("PDB(s): ", pdb_files) + for pfile in pdb_files: + shutil.copy(pfile, pdb_dest) + self.copy(pattern="*", src=package_dir) def package_info(self): @@ -148,4 +161,4 @@ def package_info(self): self.cpp_info.relwithdebinfo.includedirs = ["RelWithDebInfo/include", "RelWithDebInfo"] self.cpp_info.release.libdirs = ["Release/lib"] self.cpp_info.release.bindirs = ["Release/Plugins", "Release"] - self.cpp_info.release.includedirs = ["Release/include", "Release"] \ No newline at end of file + self.cpp_info.release.includedirs = ["Release/include", "Release"]