Skip to content

Commit 88d96c3

Browse files
committed
Update builder.py
1 parent 90df09b commit 88d96c3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cppython/plugins/cmake/builder.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ def generate_cppython_preset(
4343
)
4444

4545
if provider_data.toolchain_file:
46-
default_configure.toolchainFile = provider_data.toolchain_file.as_posix()
46+
# Make toolchain file path relative to the preset directory
47+
relative_toolchain = provider_data.toolchain_file.relative_to(cppython_preset_directory, walk_up=True)
48+
default_configure.toolchainFile = relative_toolchain.as_posix()
4749

4850
configure_presets.append(default_configure)
4951

0 commit comments

Comments
 (0)