Skip to content

Commit f162e7e

Browse files
committed
Update
1 parent 3ea5fa6 commit f162e7e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

cppython/plugins/cmake/schema.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from typing import Annotated
1111

1212
from pydantic import Field
13-
from pydantic.types import FilePath
1413

1514
from cppython.core.schema import CPPythonModel, SyncData
1615

@@ -100,7 +99,7 @@ class CMakePresets(CPPythonModel, extra='allow'):
10099
class CMakeSyncData(SyncData):
101100
"""The CMake sync data"""
102101

103-
preset_file: Annotated[FilePath, Field(description='Path to the CMakePresets.json file generated by the provider')]
102+
preset_file: Annotated[Path, Field(description='Path to the CMakePresets.json file generated by the provider.')]
104103
configurations: Annotated[
105104
list[str],
106105
Field(

cppython/plugins/conan/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,9 @@ def _create_cmake_sync_data(self) -> CMakeSyncData:
208208
Returns:
209209
CMakeSyncData configured for Conan integration
210210
"""
211-
# Conan's CMakeToolchain generator automatically creates preset files
212-
# The preset file will be created by Conan in the build directory
213-
conan_preset_path = self.core_data.cppython_data.build_path / 'CMakePresets.json'
211+
# Conan's CMakeToolchain generator creates preset files at the configured user_presets_path
212+
# This should match the path configured in the conanfile template
213+
conan_preset_path = self.core_data.cppython_data.tool_path / 'ConanPresets.json'
214214

215215
return CMakeSyncData(
216216
provider_name=TypeName('conan'),

0 commit comments

Comments
 (0)