Skip to content

Commit

Permalink
Initial commit for GNOME network manager
Browse files Browse the repository at this point in the history
  • Loading branch information
Gururaaja E S R authored and Gururaaja E S R committed Feb 1, 2024
1 parent 59b4c5c commit 779fe57
Show file tree
Hide file tree
Showing 6 changed files with 400 additions and 213 deletions.
27 changes: 18 additions & 9 deletions NetworkManager/service/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ find_package(${NAMESPACE}Core REQUIRED)
find_package(${NAMESPACE}Plugins REQUIRED)
find_package(${NAMESPACE}Definitions REQUIRED)
find_package(CURL)
if(ENABLE_GNOME_NETWORKMANAGER)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(LIBNM REQUIRED libnm)
include_directories(${GLIB_INCLUDE_DIRS})
include_directories(${LIBNM_INCLUDE_DIRS})
else()
find_package(IARMBus REQUIRED)
endif ()

message("Setup ${PROJECT_NAME} v${PROJECT_VERSION}")

Expand Down Expand Up @@ -57,15 +65,8 @@ include_directories(${PROJECT_SOURCE_DIR}/../helpers)

install(TARGETS ${MODULE_NAME} DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/${STORAGE_DIRECTORY}/plugins)

if(ENABLE_GNOME_NETWORKMANAGER)
set(PLUGIN_SOURCE_PATH gnome-nm)
elseif(ENABLE_RDK_NETWORKMANAGER)
set(PLUGIN_SOURCE_PATH rdk-nm)
else()
set(PLUGIN_SOURCE_PATH rdk-nm)
endif()

add_subdirectory(${PLUGIN_SOURCE_PATH})
#add_subdirectory(${PLUGIN_SOURCE_PATH})

# Build the implementation that runs out-of-process behind a COM-RPC interface
add_library(${PLUGIN_IMPLEMENTATION} SHARED
Expand All @@ -77,10 +78,18 @@ add_library(${PLUGIN_IMPLEMENTATION} SHARED
${PUBLIC_HEADERS}
)

if(ENABLE_GNOME_NETWORKMANAGER)
target_sources(${PLUGIN_IMPLEMENTATION} PRIVATE NetworkManagerGnomeProxy.cpp)
else()
target_sources(${PLUGIN_IMPLEMENTATION} PRIVATE NetworkManagerRDKProxy.cpp)
target_include_directories(${PLUGIN_IMPLEMENTATION} PRIVATE ${IARMBUS_INCLUDE_DIRS})
target_link_libraries(${PLUGIN_IMPLEMENTATION} PRIVATE ${IARMBUS_LIBRARIES})
endif()

target_link_libraries(${PLUGIN_IMPLEMENTATION} PRIVATE
${NAMESPACE}Plugins::${NAMESPACE}Plugins
${NAMESPACE}Definitions::${NAMESPACE}Definitions
NMWrapper)
${LIBNM_LIBRARIES})

set_target_properties(${PLUGIN_IMPLEMENTATION} PROPERTIES
CXX_STANDARD 11
Expand Down
Loading

0 comments on commit 779fe57

Please sign in to comment.