Skip to content

Commit 9917874

Browse files
committed
Relative binaryDir
1 parent ebfe39c commit 9917874

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cppython/plugins/cmake/builder.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def _create_user_presets(cmake_data: CMakeData, build_directory: Path) -> tuple[
9898
"""
9999
user_configure_preset = ConfigurePreset(
100100
name=cmake_data.configuration_name,
101-
inherits='default', # Inherit from cppython's default preset
101+
inherits='cppython',
102102
binaryDir=build_directory.as_posix(),
103103
)
104104

@@ -273,6 +273,9 @@ def write_root_presets(
273273
initial_json = file.read()
274274
initial_root_preset = CMakePresets.model_validate_json(initial_json)
275275

276+
# Ensure that the build_directory is relative to the preset_file
277+
build_directory = build_directory.relative_to(preset_file.parent)
278+
276279
root_preset = Builder.generate_root_preset(preset_file, cppython_preset_file, cmake_data, build_directory)
277280

278281
# Only write the file if the data has changed

0 commit comments

Comments
 (0)