Skip to content

Commit

Permalink
interfaces-plugin: add PIC flag to the core static library
Browse files Browse the repository at this point in the history
  • Loading branch information
zinccyy committed Jan 14, 2023
1 parent 8055d75 commit 4f490cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/interfaces/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,12 @@ include_directories(
)

# build core library
add_library(${PLUGIN_CORE_LIBRARY_NAME} SHARED ${CORE_SOURCES})
install(TARGETS ${PLUGIN_CORE_LIBRARY_NAME} DESTINATION lib)
add_library(${PLUGIN_CORE_LIBRARY_NAME} STATIC ${CORE_SOURCES})
target_compile_options(
${PLUGIN_CORE_LIBRARY_NAME}
PRIVATE
-fPIC
)

# build plugin as a module
add_library(
Expand All @@ -118,7 +122,6 @@ add_library(
${PLUGIN_SOURCES}
# ${CORE_SOURCES}
)

target_link_libraries(
${PLUGIN_MODULE_NAME}

Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/src/plugin/common.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#include "common.h"

const char* const PLUGIN_NAME = "ietf-system-plugin";
const char* const PLUGIN_NAME = "ietf-interfaces-plugin";

0 comments on commit 4f490cf

Please sign in to comment.