Skip to content

Commit 302097f

Browse files
authored
Fix include path for generated component (.g.cpp files) (#537)
1 parent d9847e9 commit 302097f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cppwinrt/component_writers.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,9 +1152,9 @@ namespace winrt::@::implementation
11521152

11531153
static void write_component_cpp(writer& w, TypeDef const& type)
11541154
{
1155-
auto filename = get_component_filename(type);
1156-
11571155
{
1156+
auto filename = get_component_filename(type);
1157+
11581158
auto format = R"(#include "%.h"
11591159
)";
11601160

@@ -1163,6 +1163,8 @@ namespace winrt::@::implementation
11631163

11641164
if (settings.component_opt)
11651165
{
1166+
auto filename = get_generated_component_filename(type);
1167+
11661168
auto format = R"(#include "%.g.cpp"
11671169
)";
11681170

0 commit comments

Comments
 (0)