Skip to content

Commit

Permalink
build(cmake): fix build of plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
precla committed Sep 22, 2023
1 parent 5cbb4bd commit 2966776
Show file tree
Hide file tree
Showing 25 changed files with 35 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/bridging/plugin/data/bridge/bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <stdint.h>

// uthash
#include <uthash/include/utlist.h>
#include "utlist.h"

void bridge_init(bridge_t* br);
void bridge_free(bridge_t* br);
Expand Down
2 changes: 1 addition & 1 deletion src/bridging/plugin/data/bridge/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "memory.h"
#include "plugin/data/bridge/bridge.h"

#include <uthash/include/utlist.h>
#include "utlist.h"

void bridge_list_init(bridge_list_element_t** head)
{
Expand Down
2 changes: 1 addition & 1 deletion src/bridging/plugin/data/component/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <stdlib.h>

#include <uthash/include/utlist.h>
#include "utlist.h"

void bridge_component_list_init(bridge_component_list_element_t** head)
{
Expand Down
2 changes: 1 addition & 1 deletion src/bridging/plugin/data/vlan/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <stdint.h>
#include <string.h>

#include <uthash/include/utlist.h>
#include "utlist.h"

#include "list.h"
#include "memory.h"
Expand Down
2 changes: 1 addition & 1 deletion src/bridging/plugin/subscription/change.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <sysrepo/xpath.h>
#include <netlink/socket.h>
#include <netlink/route/link.h>
#include <uthash/include/utlist.h>
#include "utlist.h"

#include "change.h"
#include "plugin/common.h"
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ set(PLUGIN_EXECUTABLE_NAME "ietf-interfaces-plugin")

include_directories(
${CMAKE_SOURCE_DIR}/src/interfaces/src
${CMAKE_SOURCE_DIR}/src/utils
${CMAKE_SOURCE_DIR}/deps/uthash
)

Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/src/plugin/api/interfaces/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "check.h"
#include "plugin/api/interfaces/load.h"
#include "plugin/common.h"
#include "src/uthash.h"
#include "uthash.h"
#include "srpc/types.h"
#include "sysrepo.h"

Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/src/plugin/api/interfaces/load.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "plugin/data/interfaces/interface.h"
#include "plugin/types.h"
#include "read.h"
#include "utils/memory.h"
#include "memory.h"
#include "utlist.h"

// load APIs
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/src/plugin/api/interfaces/store.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "plugin/context.h"
#include "plugin/data/interfaces/interface/ipv4/address.h"
#include "plugin/types.h"
#include "src/utlist.h"
#include "utlist.h"
#include "srpc/common.h"
#include "sysrepo/xpath.h"
#include "uthash.h"
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/src/plugin/data/interfaces/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "srpc/ly_tree.h"
#include "sysrepo.h"
#include "uthash.h"
#include "utils/memory.h"
#include "memory.h"
#include "utlist.h"

// other data API
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
#include "address.h"
#include "plugin/types.h"
#include "src/utlist.h"
#include "utlist.h"
#include "srpc/common.h"

#include <arpa/inet.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "neighbor.h"
#include "src/utlist.h"
#include "utlist.h"

interfaces_interface_ipv4_neighbor_element_t* interfaces_interface_ipv4_neighbor_new(void)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
#include "address.h"
#include "plugin/types.h"
#include "src/utlist.h"
#include "utlist.h"
#include <stdlib.h>

interfaces_interface_ipv6_address_element_t* interfaces_interface_ipv6_address_new(void)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "neighbor.h"
#include "src/utlist.h"
#include "utlist.h"

interfaces_interface_ipv6_neighbor_element_t* interfaces_interface_ipv6_neighbor_new(void)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "interface_state.h"
#include "src/uthash.h"
#include "uthash.h"
#include <string.h>

interfaces_interface_state_hash_element_t* interfaces_interface_state_hash_new(void)
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces/src/plugin/running/load.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "plugin/api/interfaces/load.h"
#include "plugin/types.h"
#include "src/uthash.h"
#include "src/utlist.h"
#include "uthash.h"
#include "utlist.h"
#include "srpc/common.h"

#include <libyang/libyang.h>
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces/src/plugin/startup/load.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "plugin/api/interfaces/load.h"
#include "plugin/types.h"
#include "src/uthash.h"
#include "src/utlist.h"
#include "uthash.h"
#include "utlist.h"
#include "srpc/common.h"

#include <libyang/libyang.h>
Expand Down
14 changes: 9 additions & 5 deletions src/routing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ target_link_libraries(
${NL_LIBRARIES}
)

include_directories(
${SYSREPO_INCLUDE_DIRS}
${LIBYANG_INCLUDE_DIRS}
${NL_INCLUDE_DIRS}
)
target_include_directories(
${PROJECT_NAME}
PUBLIC ${SYSREPO_INCLUDE_DIRS}
PUBLIC ${LIBYANG_INCLUDE_DIRS}
PUBLIC ${NL_INCLUDE_DIRS}
PUBLIC ${CMAKE_SOURCE_DIR}/src/
PUBLIC ${CMAKE_SOURCE_DIR}/src/routing
PUBLIC ${CMAKE_SOURCE_DIR}/src/utils
PRIVATE ${CMAKE_SOURCE_DIR}/deps)
2 changes: 1 addition & 1 deletion src/routing/control_plane_protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

#include "control_plane_protocol.h"
#include "utils/memory.h"
#include "memory.h"

#include <string.h>

Expand Down
2 changes: 1 addition & 1 deletion src/routing/rib.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "route/list_hash.h"
#include "rib.h"
#include "utils/memory.h"
#include "memory.h"

void rib_init(struct rib* rib)
{
Expand Down
2 changes: 1 addition & 1 deletion src/routing/rib/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <sysrepo.h>

#include "utils/memory.h"
#include "memory.h"
#include "rib.h"
#include "rib/list.h"

Expand Down
2 changes: 1 addition & 1 deletion src/routing/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

#include "route.h"
#include "utils/memory.h"
#include "memory.h"

void route_init(struct route* route)
{
Expand Down
2 changes: 1 addition & 1 deletion src/routing/route/list_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "netlink/addr.h"
#include "route/list.h"
#include "route/list_hash.h"
#include "utils/memory.h"
#include "memory.h"

#include <utlist.h>

Expand Down
2 changes: 1 addition & 1 deletion src/routing/route/next_hop.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <sysrepo.h>

#include "route/next_hop.h"
#include "utils/memory.h"
#include "memory.h"

#include <utlist.h>

Expand Down
2 changes: 1 addition & 1 deletion src/routing/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
#include "route/list_hash.h"
#include "control_plane_protocol.h"
#include "sysrepo_types.h"
#include "utils/memory.h"
#include "memory.h"

// subs
#include "subscription/change.h"
Expand Down

0 comments on commit 2966776

Please sign in to comment.