Skip to content

Commit

Permalink
Fix header export and also export proto files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehpor committed Dec 26, 2024
1 parent b6fa7d5 commit d98d2e8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions catkit2-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ target_include_directories(catkit_core PUBLIC ${PROTOBUF_INCLUDE_DIR})
target_link_libraries(catkit_core PUBLIC ${PROTOBUF_LIBRARY})

set(PROTO_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/gen/")
file(GLOB_RECURSE PROTO_SOURCES "./proto/*.proto")
set(PROTO_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/proto/")
file(GLOB_RECURSE PROTO_SOURCES "${PROTO_SOURCE_DIR}/*.proto")
file(MAKE_DIRECTORY "${PROTO_BINARY_DIR}")
protobuf_generate(
TARGET catkit_core
IMPORT_DIRS ./proto
IMPORT_DIRS "${PROTO_SOURCE_DIR}"
PROTOC_OUT_DIR "${PROTO_BINARY_DIR}"
PROTOS ${PROTO_SOURCES}
)
Expand Down Expand Up @@ -99,7 +100,7 @@ install(
DESTINATION "lib/cmake/catkit_core"
)

install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/"
DESTINATION include/catkit_core
FILES_MATCHING
PATTERN "*.h"
Expand All @@ -110,5 +111,10 @@ install(DIRECTORY "${PROTO_BINARY_DIR}"
FILES_MATCHING
PATTERN "*.h"
)
install(DIRECTORY "${PROTO_SOURCE_DIR}"
DESTINATION include/catkit_core/proto
FILES_MATCHING
PATTERN "*.proto"
)

add_subdirectory(benchmarks)

0 comments on commit d98d2e8

Please sign in to comment.