8000 cmakelists flags addition and fix · open-telemetry/opentelemetry-cpp@b030cc9 · GitHub
[go: up one dir, main page]

Skip to content

Commit b030cc9

Browse files
cmakelists flags addition and fix
1 parent fd93b32 commit b030cc9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ option(WITH_METRICS_EXEMPLAR_PREVIEW
261261
option(WITH_THREAD_INSTRUMENTATION_PREVIEW
262262
"Whether to enable thread instrumentation" OFF)
263263

264+
option(WITH_RESOURCE_DETECTORS_PREVIEW
265+
"Whether to enable inbuilt resource detectors" OFF)
266+
264267
option(OPENTELEMETRY_SKIP_DYNAMIC_LOADING_TESTS
265268
"Whether to build test libraries that are always linked as shared libs"
266269
OFF)
@@ -645,7 +648,9 @@ if(NOT WITH_API_ONLY)
645648
add_subdirectory(sdk)
646649
add_subdirectory(ext)
647650
add_subdirectory(exporters)
648-
add_subdirectory(resource_detectors)
651+
if(WITH_RESOURCE_DETECTORS_PREVIEW)
652+
add_subdirectory(resource_detectors)
653+
endif()
649654

650655
if(BUILD_TESTING)
651656
add_subdirectory(test_common)

resource_detectors/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ target_link_libraries(opentelemetry_resource_detectors
1212
PUBLIC opentelemetry_resources)
1313
target_include_directories(
1414
opentelemetry_resource_detectors
15-
PUBLIC "$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/resource_detectors/include>"
16-
"$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/sdk/include>")
15+
PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>"
16+
"$<INSTALL_INTERFACE:include>")
1717

1818
otel_add_component(
1919
COMPONENT

0 commit comments

Comments
 (0)
0