Skip to content

Commit 2c0254d

Browse files
Make the include directory inclusion the same for both paths. (#120991)
1 parent b835f0c commit 2c0254d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/coreclr/clrdatadescriptors.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function(generate_data_descriptors)
2828
# if CDAC_BUILD_TOOL_BINARY_PATH is unspecified (for example for a build without a .NET SDK or msbuild),
2929
# link a stub contract descriptor into the runtime
3030
add_library_clr(${LIBRARY} OBJECT "${DATA_DESCRIPTOR_SHARED_SOURCE_DIR}/contractdescriptorstub.c")
31-
target_include_directories(${LIBRARY} PRIVATE ${GENERATED_CDAC_DESCRIPTOR_DIR})
3231
message(STATUS "Using a stub cDAC contract descriptor")
3332
else()
3433
# generate a contract descriptor using cdac-build-tool from a data descriptor and contract json file
@@ -74,9 +73,6 @@ function(generate_data_descriptors)
7473
)
7574
add_dependencies(${LIBRARY} ${INTERMEDIARY_LIBRARY})
7675

77-
target_include_directories(${LIBRARY} PUBLIC ${DATA_DESCRIPTOR_SHARED_INCLUDE_DIR})
78-
target_include_directories(${LIBRARY} PRIVATE ${GENERATED_CDAC_DESCRIPTOR_DIR})
79-
8076
# inherit definitions, include directories, and dependencies from the INTERFACE target
8177
target_link_libraries(${LIBRARY} PRIVATE ${DATA_DESCRIPTORS_INTERFACE_TARGET})
8278

@@ -88,4 +84,8 @@ function(generate_data_descriptors)
8884
target_compile_options(${LIBRARY} PRIVATE /Zc:externConstexpr)
8985
endif(MSVC)
9086
endif()
87+
88+
# Set include directories for the data descriptor targets, now that they are created.
89+
target_include_directories(${LIBRARY} PUBLIC ${DATA_DESCRIPTOR_SHARED_INCLUDE_DIR})
90+
target_include_directories(${LIBRARY} PRIVATE ${GENERATED_CDAC_DESCRIPTOR_DIR})
9191
endfunction(generate_data_descriptors)

0 commit comments

Comments
 (0)