diff --git a/packages/cpp/ArmoniK.Api.Worker/CMakeLists.txt b/packages/cpp/ArmoniK.Api.Worker/CMakeLists.txt index a9438e86f..1f14608ea 100644 --- a/packages/cpp/ArmoniK.Api.Worker/CMakeLists.txt +++ b/packages/cpp/ArmoniK.Api.Worker/CMakeLists.txt @@ -13,14 +13,6 @@ set(PROTO_MESSAGES list(TRANSFORM PROTO_FILES PREPEND ${PROTO_FILES_DIR}/) list(TRANSFORM PROTO_MESSAGES PREPEND ${PROTO_FILES_DIR}/) -# Trouver les packages requis -if (UNIX) - find_package(Protobuf REQUIRED) -else() - find_package(Protobuf CONFIG REQUIRED) -endif() -find_package(gRPC CONFIG REQUIRED) -find_package(Threads) SET(SOURCES_FILES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/source") SET(HEADER_FILES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/header") @@ -32,6 +24,15 @@ file(MAKE_DIRECTORY ${PROJECT_BUILD_DIR}/proto) add_library(${PROJECT_NAME} ${PROTO_GENERATED_FILES} ${SRC_CLIENT_FILES} ${HEADER_CLIENT_FILES}) +# Trouver les packages requis +if (UNIX) + find_package(Protobuf REQUIRED) +else() + find_package(Protobuf CONFIG REQUIRED) +endif() +find_package(gRPC CONFIG REQUIRED) +find_package(Threads) + target_link_libraries(${PROJECT_NAME} PUBLIC protobuf::libprotobuf gRPC::grpc++_unsecure ArmoniK.Api.Common ${PROTO_TARGET}) target_include_directories(${PROJECT_NAME} diff --git a/packages/cpp/Dependencies.cmake b/packages/cpp/Dependencies.cmake index 459e07763..36e8eabed 100644 --- a/packages/cpp/Dependencies.cmake +++ b/packages/cpp/Dependencies.cmake @@ -6,4 +6,4 @@ if(NOT DEFINED SRC_SIMDJSON) endif() if(NOT DEFINED SRC_GTEST) set(SRC_GTEST "https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip") -endif() \ No newline at end of file +endif()