Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/evercbor.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# Licensed under the Apache 2.0 License.

# Build EverCBOR
set(EVERCBOR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/exported/evercbor")
set(EVERCBOR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/internal/evercbor")
set(EVERCBOR_SRCS "${EVERCBOR_DIR}/CBORNondet.c")

add_library(evercbor STATIC ${EVERCBOR_SRCS})

target_include_directories(
evercbor PUBLIC $<BUILD_INTERFACE:${CCF_3RD_PARTY_EXPORTED_DIR}/evercbor>
evercbor PUBLIC $<BUILD_INTERFACE:${CCF_3RD_PARTY_INTERNAL_DIR}/evercbor>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is right, I think the target_include_directories should be PRIVATE instead, and probably not refer to the install interface, since the point of moving from external to internal is to not export these headers.

For this to work, we need to make sure that none of the headers we export in include/ccf include headers from evercbor. I do not know if that is (already) the case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR simply moves it from exported to internal to avoid them being packaged

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but we still export the include directory as a public dependency, so that seems like a breaking change

$<INSTALL_INTERFACE:include/3rdparty/evercbor>
)
set_property(TARGET evercbor PROPERTY POSITION_INDEPENDENT_CODE ON)
Expand Down