🧹 gucc: move headers into separate path

This commit is contained in:
Vladislav Nepogodin 2024-06-26 16:16:34 +04:00
parent 892bc83df7
commit 795b8b183e
No known key found for this signature in database
GPG Key ID: B62C3D10C54D5DA9
25 changed files with 37 additions and 35 deletions

View File

@ -132,7 +132,7 @@ target_link_libraries(screen PRIVATE range-v3::range-v3)
target_link_libraries(dom PRIVATE range-v3::range-v3)
target_link_libraries(component PRIVATE range-v3::range-v3)
include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/gucc/src ${RAPIDJSON_INCLUDE_DIR})
include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/gucc/include ${RAPIDJSON_INCLUDE_DIR})
add_subdirectory(gucc)

View File

@ -10,17 +10,17 @@ project(gucc
add_library(${PROJECT_NAME} SHARED
#src/utils.cpp src/utils.hpp
src/string_utils.cpp src/string_utils.hpp
src/file_utils.cpp src/file_utils.hpp
src/cpu.cpp src/cpu.hpp
src/pacmanconf_repo.cpp src/pacmanconf_repo.hpp
src/initcpio.cpp src/initcpio.hpp
src/string_utils.cpp include/gucc/string_utils.hpp
src/file_utils.cpp include/gucc/file_utils.hpp
src/cpu.cpp include/gucc/cpu.hpp
src/pacmanconf_repo.cpp include/gucc/pacmanconf_repo.hpp
src/initcpio.cpp include/gucc/initcpio.hpp
#src/chwd_profiles.cpp src/chwd_profiles.hpp
#src/disk.cpp src/disk.hpp
)
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_DIR}/src)
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_DIR}/include)
target_link_libraries(${PROJECT_NAME} PUBLIC project_warnings project_options spdlog::spdlog fmt::fmt range-v3::range-v3)
if(COS_INSTALLER_BUILD_TESTS)

View File

@ -6,7 +6,7 @@ gucc_lib = library('gucc',
'src/pacmanconf_repo.cpp',
'src/initcpio.cpp',
],
include_directories : [include_directories('src')],
include_directories : [include_directories('include')],
dependencies: deps
)

View File

@ -1,4 +1,4 @@
#include "cpu.hpp"
#include "gucc/cpu.hpp"
#include <sys/utsname.h> // for uname

View File

@ -1,4 +1,4 @@
#include "file_utils.hpp"
#include "gucc/file_utils.hpp"
#include <cerrno> // for errno, strerror
#include <cstdio> // for feof, fgets, pclose, perror, popen

View File

@ -1,6 +1,6 @@
#include "initcpio.hpp"
#include "file_utils.hpp"
#include "string_utils.hpp"
#include "gucc/initcpio.hpp"
#include "gucc/file_utils.hpp"
#include "gucc/string_utils.hpp"
#include <fstream> // for ofstream

View File

@ -1,5 +1,5 @@
#include "pacmanconf_repo.hpp"
#include "file_utils.hpp"
#include "gucc/pacmanconf_repo.hpp"
#include "gucc/file_utils.hpp"
#include <fstream> // for ofstream
#include <string> // for string

View File

@ -1,4 +1,4 @@
#include "string_utils.hpp"
#include "gucc/string_utils.hpp"
#if defined(__clang__)
#pragma clang diagnostic push

View File

@ -3,7 +3,7 @@ executable(
files('unit-initcpio.cpp'),
dependencies: deps,
link_with: [gucc_lib],
include_directories: [include_directories('../src')],
include_directories: [include_directories('../include')],
install: false)
executable(
@ -11,5 +11,5 @@ executable(
files('unit-pacmanconf.cpp'),
dependencies: deps,
link_with: [gucc_lib],
include_directories: [include_directories('../src')],
include_directories: [include_directories('../include')],
install: false)

View File

@ -1,5 +1,5 @@
#include "file_utils.hpp"
#include "initcpio.hpp"
#include "gucc/file_utils.hpp"
#include "gucc/initcpio.hpp"
#include <cassert>
#include <fstream>

View File

@ -1,5 +1,5 @@
#include "file_utils.hpp"
#include "pacmanconf_repo.hpp"
#include "gucc/file_utils.hpp"
#include "gucc/pacmanconf_repo.hpp"
#include <cassert>
#include <filesystem>

View File

@ -170,7 +170,7 @@ executable(
src_files,
dependencies: deps,
link_with: gucc_lib,
include_directories: [include_directories('src'), include_directories('gucc/src')],
include_directories: [include_directories('src'), include_directories('gucc/include')],
install: true)
install_data(

View File

@ -2,7 +2,7 @@
#include "utils.hpp"
// import gucc
#include "string_utils.hpp"
#include "gucc/string_utils.hpp"
#include <algorithm> // for any_of, sort, for_each

View File

@ -4,7 +4,7 @@
#include "widgets.hpp"
// import gucc
#include "string_utils.hpp"
#include "gucc/string_utils.hpp"
#include <fmt/compile.h>
#include <fmt/format.h>

View File

@ -4,7 +4,7 @@
#include "widgets.hpp"
// import gucc
#include "string_utils.hpp"
#include "gucc/string_utils.hpp"
#include <filesystem> // for exists, is_directory
#include <ftxui/component/component.hpp> // for Renderer, Button

View File

@ -4,7 +4,7 @@
#include "widgets.hpp"
// import gucc
#include "string_utils.hpp"
#include "gucc/string_utils.hpp"
#include <chrono> // for operator""s, chrono_literals
#include <string> // for string, operator<<, to_string

View File

@ -6,7 +6,7 @@
#include "widgets.hpp"
// import gucc
#include "string_utils.hpp"
#include "gucc/string_utils.hpp"
/* clang-format off */
#include <cstdlib> // for setenv

View File

@ -10,7 +10,7 @@
#include "widgets.hpp"
// import gucc
#include "string_utils.hpp"
#include "gucc/string_utils.hpp"
#include <fmt/compile.h>
#include <fmt/format.h>

View File

@ -1,16 +1,16 @@
#include "utils.hpp"
#include "config.hpp"
#include "cpu.hpp"
#include "definitions.hpp"
#include "initcpio.hpp"
#include "pacmanconf_repo.hpp"
#include "subprocess.h"
#include "tui.hpp"
#include "widgets.hpp"
// import gucc
#include "file_utils.hpp"
#include "string_utils.hpp"
#include "gucc/cpu.hpp"
#include "gucc/file_utils.hpp"
#include "gucc/initcpio.hpp"
#include "gucc/pacmanconf_repo.hpp"
#include "gucc/string_utils.hpp"
#include <algorithm> // for transform
#include <array> // for array

View File

@ -1,5 +1,7 @@
#include "widgets.hpp"
#include "string_utils.hpp" // for make_multiline
// import gucc
#include "gucc/string_utils.hpp" // for make_multiline
#include <algorithm> // for transform
#include <cstddef> // for size_t