summaryrefslogtreecommitdiff
path: root/src/currency/CMakeLists.txt
diff options
context:
space:
mode:
authorSaumit <justsaumit@protonmail.com>2025-09-27 02:14:26 +0530
committerSaumit <justsaumit@protonmail.com>2025-09-27 02:14:26 +0530
commit82e03978b89938219958032efb1448cc76baa181 (patch)
tree626f3e54d52ecd49be0ed3bee30abacc0453d081 /src/currency/CMakeLists.txt
Initial snapshot - OpenTelemetry demo 2.1.3 -f
Diffstat (limited to 'src/currency/CMakeLists.txt')
-rw-r--r--src/currency/CMakeLists.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/currency/CMakeLists.txt b/src/currency/CMakeLists.txt
new file mode 100644
index 0000000..36c8858
--- /dev/null
+++ b/src/currency/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 3.26)
+project(currency)
+
+find_package(Protobuf REQUIRED)
+find_package(gRPC CONFIG REQUIRED)
+find_package(opentelemetry-cpp CONFIG REQUIRED)
+
+set(GENERATED_PROTOBUF_PATH "${CMAKE_BINARY_DIR}/generated/proto")
+
+add_subdirectory(genproto)
+
+include_directories("${GENERATED_PROTOBUF_PATH}" "${OPENTELEMETRY_CPP_INCLUDE_DIRS}")
+
+add_executable(currency src/server.cpp)
+add_dependencies(currency demo-proto)
+target_link_libraries(
+ currency demo-proto protobuf::libprotobuf
+ ${OPENTELEMETRY_CPP_LIBRARIES} opentelemetry_trace opentelemetry_common
+ opentelemetry_exporter_otlp_grpc opentelemetry_exporter_otlp_grpc_client
+ opentelemetry_proto opentelemetry_otlp_recordable opentelemetry_resources
+ opentelemetry_metrics opentelemetry_exporter_otlp_grpc_metrics gRPC::grpc++)
+
+install(TARGETS currency DESTINATION bin)