From afff098c23d01e9e028c9ab4062034b7364701bd Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Wed, 1 Dec 2021 21:15:15 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20add=20libnm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 9 ++++++++- meson.build | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 111c0ae..ffc92f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,13 @@ include(StaticAnalyzers) include(Sanitizers) include(FetchContent) +find_package(PkgConfig REQUIRED) +pkg_check_modules( + LIBNM + REQUIRED + IMPORTED_TARGET + libnm>=1.32.12) + FetchContent_Declare(ftxui GIT_REPOSITORY "https://github.com/arthursonzogni/ftxui.git" GIT_TAG "cecd54df42dd66fdf8386ed461e16b725bffc827" @@ -83,7 +90,7 @@ enable_sanitizers(project_options) include_directories(${CMAKE_SOURCE_DIR}/src) -target_link_libraries(${PROJECT_NAME} PRIVATE project_warnings project_options fmt::fmt ftxui::screen ftxui::dom ftxui::component nlohmann_json::nlohmann_json cpr::cpr) +target_link_libraries(${PROJECT_NAME} PRIVATE project_warnings project_options fmt::fmt ftxui::screen ftxui::dom ftxui::component nlohmann_json::nlohmann_json cpr::cpr PkgConfig::LIBNM) option(ENABLE_UNITY "Enable Unity builds of projects" OFF) if(ENABLE_UNITY) diff --git a/meson.build b/meson.build index 484ffa0..0ccfd5d 100644 --- a/meson.build +++ b/meson.build @@ -27,6 +27,7 @@ fmt = dependency('fmt', version : ['>=8.0.0'], fallback : ['fmt', 'fmt_dep']) ftxui = dependency('ftxui', modules : ['ftxui::screen', 'ftxui::dom', 'ftxui::component'], fallback : ['ftxui', 'ftxui_dep']) nlohmann_json = dependency('nlohmann_json', version : ['>=3.10.4'], fallback : ['nlohmann_json', 'nlohmann_json_dep']) cpr = dependency('cpr', version : ['>=1.7.0'], fallback : ['cpr', 'cpr_dep']) +libnm = dependency('libnm', version : ['>=1.32.12']) src_files = files( 'src/definitions.hpp', @@ -87,7 +88,7 @@ add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : executable( 'cachyos-installer', src_files, - dependencies: [fmt, ftxui, nlohmann_json, cpr], + dependencies: [fmt, ftxui, nlohmann_json, cpr, libnm], include_directories: [include_directories('src')], install: true)