Skip to content

Commit

Permalink
build: cmake fix order of inclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
fouge committed Oct 18, 2024
1 parent 8230d5f commit 2bf204a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ if (CONFIG_ORB_MCU_MESSAGING_LIB)

set(SRC_FILES)
# look for sec_priv.proto in private first, then in private_stub
set(PRIV_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../messages/private)
if (NOT EXISTS ${PRIV_INCLUDE_DIR}/sec_priv.proto)
# set(PRIV_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../messages/private)
# if (NOT EXISTS ${PRIV_INCLUDE_DIR}/sec_priv.proto)
set(PRIV_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../messages/private_stub)
if (NOT EXISTS ${PRIV_INCLUDE_DIR}/sec_priv.proto)
message(FATAL_ERROR "sec_priv.proto not found in private or private_stub")
endif ()
endif ()
# endif ()
# sec_priv.proto must be first in the list
list(APPEND PROTO_FILES ../messages/orb.proto ../messages/main.proto ../messages/sec.proto ../messages/common.proto ${PRIV_INCLUDE_DIR}/sec_priv.proto)
list(APPEND PROTO_FILES ${PRIV_INCLUDE_DIR}/sec_priv.proto ../messages/orb.proto ../messages/main.proto ../messages/sec.proto ../messages/common.proto)
list(APPEND SRC_FILES ${CMAKE_CURRENT_BINARY_DIR}/main.pb.c ${CMAKE_CURRENT_BINARY_DIR}/sec.pb.c ${CMAKE_CURRENT_BINARY_DIR}/common.pb.c ${CMAKE_CURRENT_BINARY_DIR}/sec_priv.pb.c)
list(APPEND NANOPB_OPTIONS "-I${PRIV_INCLUDE_DIR}")

Expand Down

0 comments on commit 2bf204a

Please sign in to comment.