Skip to content

Commit

Permalink
Fix nested Cmake build
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schildt <sebastian.schildt@de.bosch.com>
  • Loading branch information
SebastianSchildt committed Mar 4, 2025
1 parent 5d25abe commit 3e89d3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kuksa-cpp-client/src/generate.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/
# Recursively find all .proto files
file(GLOB_RECURSE proto_files "${CMAKE_SOURCE_DIR}/proto/*.proto")
file(GLOB_RECURSE proto_files "${PROJECT_SOURCE_DIR}/proto/*.proto")

add_library(proto-objects OBJECT ${PROTO_FILES})

target_link_libraries(proto-objects PUBLIC protobuf::libprotobuf gRPC::grpc++)

set(PROTO_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/proto")
set(PROTO_IMPORT_DIRS "${CMAKE_SOURCE_DIR}/proto")
set(PROTO_IMPORT_DIRS "${PROJECT_SOURCE_DIR}/proto")

# Ensure the output directory exists
file(MAKE_DIRECTORY ${PROTO_BINARY_DIR})
Expand Down

0 comments on commit 3e89d3d

Please sign in to comment.