diff --git a/CMakeLists.txt b/CMakeLists.txt index c04d523..b47932b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,6 +54,15 @@ endif() find_package(OpenSSL REQUIRED) find_package(Protobuf REQUIRED) +if(Protobuf_PROTOC_EXECUTABLE) + if(NOT TARGET protobuf::protoc) + add_executable(protobuf::protoc IMPORTED) + if(EXISTS "${Protobuf_PROTOC_EXECUTABLE}") + set_target_properties(protobuf::protoc PROPERTIES + IMPORTED_LOCATION "${Protobuf_PROTOC_EXECUTABLE}") + endif() + endif() +endif() find_package(cpprestsdk QUIET) if(cpprestsdk_FOUND) set(CPPREST_INCLUDE_DIR)