File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -158,9 +158,20 @@ set(_OPENTELEMETRY_CPP_TARGETS
158158
159159set (_FIND_ALL_COMPONENTS TRUE )
160160
161+ set (_OPENTELEMETRY_CPP_REQUESTED_COMPONENTS)
162+
161163if (NOT DEFINED opentelemetry-cpp_FIND_COMPONENTS OR opentelemetry-cpp_FIND_COMPONENTS STREQUAL "" )
162164 # if no components are requested then find all installed components
163- set (_OPENTELEMETRY_CPP_REQUESTED_COMPONENTS ${_OPENTELEMETRY_CPP_COMPONENTS} )
165+
166+ set (_TARGET_FILES_DIR "${CMAKE_CURRENT_LIST_DIR} " )
167+
168+ foreach (_COMPONENT IN LISTS _OPENTELEMETRY_CPP_COMPONENTS)
169+ set (_COMPONENT_TARGET_FILE "${_TARGET_FILES_DIR} /opentelemetry-cpp-${_COMPONENT} -target.cmake" )
170+ if (EXISTS "${_COMPONENT_TARGET_FILE} " )
171+ list (APPEND _OPENTELEMETRY_CPP_REQUESTED_COMPONENTS ${_COMPONENT} )
172+ endif ()
173+ endforeach ()
174+
164175else ()
165176 set (_FIND_ALL_COMPONENTS FALSE )
166177 # check that the requested components are valid and installed
You can’t perform that action at this time.
0 commit comments