mirror of
https://github.com/CachyOS/New-Cli-Installer.git
synced 2025-01-23 14:32:22 +08:00
🧹 gucc: move headers into separate path
This commit is contained in:
parent
892bc83df7
commit
795b8b183e
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
)
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "cpu.hpp"
|
||||
#include "gucc/cpu.hpp"
|
||||
|
||||
#include <sys/utsname.h> // for uname
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "string_utils.hpp"
|
||||
#include "gucc/string_utils.hpp"
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
|
@ -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)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "file_utils.hpp"
|
||||
#include "initcpio.hpp"
|
||||
#include "gucc/file_utils.hpp"
|
||||
#include "gucc/initcpio.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <fstream>
|
||||
|
@ -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>
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user