From 08b3cd8d3ae08393af730321ebaf99a888bd1e6f Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Tue, 7 Oct 2025 16:47:55 +0200 Subject: [PATCH 01/13] Add PDB file copying for Windows builds Copy PDB files to the RelWithDebInfo/lib directory on Windows. --- conanfile.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/conanfile.py b/conanfile.py index ba6073f..fa9e6a9 100644 --- a/conanfile.py +++ b/conanfile.py @@ -146,6 +146,15 @@ def package(self): release_dir, ] ) + + # Add the pdb files next to the libs for RelWithDebInfo linking + if tools.os_info.is_windows: + pdb_dest = pathlib.Path(self.install_dir, "RelWithDebInfo/lib") + # pdb_dest.mkdir() + pdb_files = pathlib.Path(self.build_folder).glob("hdps/RelWithDebInfo/*.pdb") + for pfile in pdb_files: + shutil.copy(pfile, pdb_dest) + self.copy(pattern="*", src=package_dir) def package_info(self): From 7f63657afe0c3078d903a27609236807e8329389 Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Tue, 7 Oct 2025 16:51:08 +0200 Subject: [PATCH 02/13] Add debug information flag for RelWithDebInfo mode --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b9674d0..0c00e80 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") + set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /DEBUG") endif() # ----------------------------------------------------------------------------- From a50fef9a239ebdca187abeb16381b1e7345a812b Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Tue, 7 Oct 2025 17:19:14 +0200 Subject: [PATCH 03/13] Add import for tools in conanfile.py --- conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conanfile.py b/conanfile.py index fa9e6a9..a665c4d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,6 +1,7 @@ from conans import ConanFile from conan.tools.cmake import CMakeDeps, CMake, CMakeToolchain from conans.tools import save, load +from conans import tools import os import pathlib import subprocess From c9fa4d153ad288c351c37c7701e1ba2c40627fab Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Tue, 7 Oct 2025 17:55:17 +0200 Subject: [PATCH 04/13] Set ManiVault installation directory from environment Add installation directory for ManiVault --- conanfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conanfile.py b/conanfile.py index a665c4d..1821883 100644 --- a/conanfile.py +++ b/conanfile.py @@ -99,6 +99,8 @@ def generate(self): # Use the ManiVault .cmake file to find ManiVault with find_package mv_core_root = self.deps_cpp_info["hdps-core"].rootpath manivault_dir = pathlib.Path(mv_core_root, "cmake", "mv").as_posix() + self.install_dir = pathlib.Path(os.environ["MV_INSTALL_DIR"]).as_posix() + print("ManiVault_DIR: ", manivault_dir) tc.variables["ManiVault_DIR"] = manivault_dir From 73b9d968d8df14e492d947adabcb8e9b9b36f1c3 Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Tue, 7 Oct 2025 18:02:52 +0200 Subject: [PATCH 05/13] Update conanfile.py --- conanfile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 1821883..46dc610 100644 --- a/conanfile.py +++ b/conanfile.py @@ -99,7 +99,6 @@ def generate(self): # Use the ManiVault .cmake file to find ManiVault with find_package mv_core_root = self.deps_cpp_info["hdps-core"].rootpath manivault_dir = pathlib.Path(mv_core_root, "cmake", "mv").as_posix() - self.install_dir = pathlib.Path(os.environ["MV_INSTALL_DIR"]).as_posix() print("ManiVault_DIR: ", manivault_dir) tc.variables["ManiVault_DIR"] = manivault_dir @@ -150,6 +149,8 @@ def package(self): ] ) + self.install_dir = pathlib.Path(os.environ["MV_INSTALL_DIR"]).as_posix() + # Add the pdb files next to the libs for RelWithDebInfo linking if tools.os_info.is_windows: pdb_dest = pathlib.Path(self.install_dir, "RelWithDebInfo/lib") From 5cf177c8cb19ab7a6db6042321b004d3376b7dfb Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Wed, 8 Oct 2025 10:50:28 +0200 Subject: [PATCH 06/13] Refactor PDB file handling in conanfile.py Remove installation directory from environment variable and update PDB destination path. --- conanfile.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index 46dc610..b8a93f3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -149,11 +149,9 @@ def package(self): ] ) - self.install_dir = pathlib.Path(os.environ["MV_INSTALL_DIR"]).as_posix() - # Add the pdb files next to the libs for RelWithDebInfo linking if tools.os_info.is_windows: - pdb_dest = pathlib.Path(self.install_dir, "RelWithDebInfo/lib") + pdb_dest = pathlib.Path(package_dir, "RelWithDebInfo/lib") # pdb_dest.mkdir() pdb_files = pathlib.Path(self.build_folder).glob("hdps/RelWithDebInfo/*.pdb") for pfile in pdb_files: From daeaaca16e49eca511f501e5a07a79ab2bae8c7e Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Wed, 8 Oct 2025 11:03:24 +0200 Subject: [PATCH 07/13] Fix pdb file copying for RelWithDebInfo builds Ensure pdb files are copied correctly for Windows builds. --- conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index b8a93f3..3c6da48 100644 --- a/conanfile.py +++ b/conanfile.py @@ -152,8 +152,8 @@ def package(self): # Add the pdb files next to the libs for RelWithDebInfo linking if tools.os_info.is_windows: pdb_dest = pathlib.Path(package_dir, "RelWithDebInfo/lib") - # pdb_dest.mkdir() - pdb_files = pathlib.Path(self.build_folder).glob("hdps/RelWithDebInfo/*.pdb") + pdb_dest.mkdir() + pdb_files = pathlib.Path(self.build_folder).glob("*.pdb") for pfile in pdb_files: shutil.copy(pfile, pdb_dest) From d43103017cc735bc40449df63712f795d1c41a78 Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Wed, 8 Oct 2025 11:16:13 +0200 Subject: [PATCH 08/13] Update conanfile.py --- conanfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conanfile.py b/conanfile.py index 3c6da48..c1d7ed4 100644 --- a/conanfile.py +++ b/conanfile.py @@ -148,16 +148,16 @@ def package(self): release_dir, ] ) + + self.copy(pattern="*", src=package_dir) # Add the pdb files next to the libs for RelWithDebInfo linking if tools.os_info.is_windows: - pdb_dest = pathlib.Path(package_dir, "RelWithDebInfo/lib") + pdb_dest = pathlib.Path(package_dir, "RelWithDebInfo/pdb") pdb_dest.mkdir() pdb_files = pathlib.Path(self.build_folder).glob("*.pdb") for pfile in pdb_files: shutil.copy(pfile, pdb_dest) - - self.copy(pattern="*", src=package_dir) def package_info(self): self.cpp_info.relwithdebinfo.libdirs = ["RelWithDebInfo/lib"] From 9c1cc1a69659da684e441e4205aa7de5cdf5312d Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Wed, 8 Oct 2025 11:27:15 +0200 Subject: [PATCH 09/13] Fix pdb destination path for Windows builds --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index c1d7ed4..429787e 100644 --- a/conanfile.py +++ b/conanfile.py @@ -153,7 +153,7 @@ def package(self): # Add the pdb files next to the libs for RelWithDebInfo linking if tools.os_info.is_windows: - pdb_dest = pathlib.Path(package_dir, "RelWithDebInfo/pdb") + pdb_dest = pathlib.Path(package_dir, "RelWithDebInfo", "pdb") pdb_dest.mkdir() pdb_files = pathlib.Path(self.build_folder).glob("*.pdb") for pfile in pdb_files: From 3fa0f318202d8489f47100ae63b559032c1bb44a Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Wed, 8 Oct 2025 11:37:07 +0200 Subject: [PATCH 10/13] Update Windows OS check in conanfile.py --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 429787e..cb13cdd 100644 --- a/conanfile.py +++ b/conanfile.py @@ -152,7 +152,7 @@ def package(self): self.copy(pattern="*", src=package_dir) # Add the pdb files next to the libs for RelWithDebInfo linking - if tools.os_info.is_windows: + if self.settings.os == "Windows": pdb_dest = pathlib.Path(package_dir, "RelWithDebInfo", "pdb") pdb_dest.mkdir() pdb_files = pathlib.Path(self.build_folder).glob("*.pdb") From acccbfcc99f328cf11843f15b256051bd47844cb Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Wed, 8 Oct 2025 14:21:36 +0200 Subject: [PATCH 11/13] Log PDB file copying on Windows Add print statement for PDB file copying process --- conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conanfile.py b/conanfile.py index cb13cdd..c76c02d 100644 --- a/conanfile.py +++ b/conanfile.py @@ -153,6 +153,7 @@ def package(self): # Add the pdb files next to the libs for RelWithDebInfo linking if self.settings.os == "Windows": + print("Copying PDBs...") pdb_dest = pathlib.Path(package_dir, "RelWithDebInfo", "pdb") pdb_dest.mkdir() pdb_files = pathlib.Path(self.build_folder).glob("*.pdb") From eb2eb717c0f691c0dee7ddeb1682f950847d14f6 Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Wed, 8 Oct 2025 14:33:03 +0200 Subject: [PATCH 12/13] Refactor PDB file handling in conanfile.py Refactor PDB file copying logic and ensure all files are copied from the package directory. --- conanfile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index c76c02d..5b74aea 100644 --- a/conanfile.py +++ b/conanfile.py @@ -149,17 +149,20 @@ def package(self): ] ) - self.copy(pattern="*", src=package_dir) + # Add the pdb files next to the libs for RelWithDebInfo linking if self.settings.os == "Windows": print("Copying PDBs...") pdb_dest = pathlib.Path(package_dir, "RelWithDebInfo", "pdb") pdb_dest.mkdir() - pdb_files = pathlib.Path(self.build_folder).glob("*.pdb") + 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): self.cpp_info.relwithdebinfo.libdirs = ["RelWithDebInfo/lib"] self.cpp_info.relwithdebinfo.bindirs = ["RelWithDebInfo/Plugins", "RelWithDebInfo"] From 860ad580a79ed25f70c807cb25d8d09515482338 Mon Sep 17 00:00:00 2001 From: Thomas Kroes Date: Wed, 8 Oct 2025 14:43:18 +0200 Subject: [PATCH 13/13] Add import for shutil module --- conanfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conanfile.py b/conanfile.py index 5b74aea..a95e3b9 100644 --- a/conanfile.py +++ b/conanfile.py @@ -4,6 +4,7 @@ from conans import tools import os import pathlib +import shutil import subprocess from rules_support import PluginBranchInfo