summaryrefslogtreecommitdiff
path: root/src/currency/CMakeLists.txt
diff options
context:
space:
mode:
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)