From 368f172fe00581dc09405a2c1f1e5ccfcb273040 Mon Sep 17 00:00:00 2001 From: Tom Tan Date: Wed, 20 Oct 2021 22:13:43 -0700 Subject: [PATCH] Fix cmake find thrift when vcpkg is used (#1022) --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c39c3687f3..b6e2585631c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,10 @@ project(opentelemetry-cpp) # Mark variables as used so cmake doesn't complain about them mark_as_advanced(CMAKE_TOOLCHAIN_FILE) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/") +# Don't use customized cmake modules if vcpkg is used to resolve dependence. +if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) + list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/") +endif() if(DEFINED ENV{ARCH}) # Architecture may be specified via ARCH environment variable