Skip to content

Commit 5e6d9a0

Browse files
committed
Fix Top-Level_Includes
1 parent b869c7e commit 5e6d9a0

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

cppython/plugins/cmake/schema.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ class CMakeConfiguration(CPPythonModel):
6868
preset_file: Annotated[
6969
Path,
7070
Field(
71-
description="The CMakePreset.json file that will be searched for the given 'configuration_name'",
71+
description='The CMakePreset.json file that will be managed by CPPython. Will'
72+
" be searched for the given 'configuration_name'",
7273
),
7374
] = Path('CMakePresets.json')
74-
configuration_name: Annotated[str, Field(description='The CMake configuration preset to look for and override')]
75+
configuration_name: Annotated[
76+
str, Field(description='The CMake configuration preset to look for and override inside the given `preset_file`')
77+
]

cppython/plugins/vcpkg/plugin.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ def _update_provider(cls, path: Path) -> None:
9191
logger.error('Unable to bootstrap the vcpkg repository', exc_info=True)
9292
raise
9393

94-
@staticmethod
95-
def sync_data(consumer: SyncConsumer) -> SyncData:
94+
def sync_data(self, consumer: SyncConsumer) -> SyncData:
9695
"""Gathers a data object for the given generator
9796
9897
Args:
@@ -106,7 +105,10 @@ def sync_data(consumer: SyncConsumer) -> SyncData:
106105
"""
107106
for sync_type in consumer.sync_types():
108107
if sync_type == CMakeSyncData:
109-
return CMakeSyncData(provider_name=TypeName('vcpkg'), top_level_includes=Path('test'))
108+
return CMakeSyncData(
109+
provider_name=TypeName('vcpkg'),
110+
top_level_includes=self.core_data.cppython_data.install_path / 'scripts/buildsystems/vcpkg.cmake',
111+
)
110112

111113
raise NotSupportedError('OOF')
112114

0 commit comments

Comments
 (0)