Fixed cmake on fedora removed segfault
This commit is contained in:
parent
f7363c91cf
commit
2dd37bef9b
|
@ -115,7 +115,7 @@ endif()
|
|||
|
||||
#Apple and other
|
||||
if (NOT ${GUIX})
|
||||
target_link_libraries(gd-tools_exe PRIVATE marisa cpr::cpr nlohmann_json::nlohmann_json rdricpp::rdricpp)
|
||||
target_link_libraries(gd-tools_exe PRIVATE marisa cpr::cpr nlohmann_json::nlohmann_json rdricpp)
|
||||
endif()
|
||||
|
||||
# ---- Install rules ----
|
||||
|
|
|
@ -6,6 +6,7 @@ if ( (NOT ${GUIX}) )
|
|||
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
|
||||
GIT_TAG v3.5.2)
|
||||
FetchContent_MakeAvailable(catch)
|
||||
include(Catch)
|
||||
endif() #Adds Catch2::Catch2
|
||||
|
||||
include(CTest)
|
||||
|
|
27
src/main.cpp
27
src/main.cpp
|
@ -164,21 +164,22 @@ auto main(/*int const argc, char const* const* const argv*/) -> int
|
|||
#ifndef WIN32 //General Main
|
||||
auto main(int const argc, char const* const* const argv) -> int
|
||||
{
|
||||
std::vector<std::string_view> args{};
|
||||
for(int i{0}; i < argc; i++)
|
||||
args.push_back(argv[i]);
|
||||
if(argc > 1){
|
||||
|
||||
//Automatically change font for handwritten
|
||||
std::string_view font = "--font-family";
|
||||
std::string_view font_value = "armedlemon";
|
||||
if(std::string(argv[1]) == "handwritten" || base_name(argv[0]) == "gd-handwritten" && argc > 2){
|
||||
args.push_back(font);
|
||||
args.push_back(font_value);
|
||||
}
|
||||
std::vector<std::string_view> args{};
|
||||
for(int i{0}; i < argc; i++)
|
||||
args.push_back(argv[i]);
|
||||
|
||||
take_action(args);
|
||||
//Automatically change font for handwritten
|
||||
std::string_view font = "--font-family";
|
||||
std::string_view font_value = "armedlemon";
|
||||
if(std::string(argv[1]) == "handwritten" || base_name(argv[0]) == "gd-handwritten" && argc > 2){
|
||||
args.push_back(font);
|
||||
args.push_back(font_value);
|
||||
}
|
||||
|
||||
//Original code
|
||||
//take_action(std::vector<std::string_view>{ argv, std::next(argv, argc) });
|
||||
take_action(args);
|
||||
}else
|
||||
take_action(std::vector<std::string_view>{ argv, std::next(argv, argc) });
|
||||
}
|
||||
#endif //General Main
|
||||
|
|
Loading…
Reference in a new issue