diff --git a/CMakeLists.txt b/CMakeLists.txt index 5484bdc..82737c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 ---- diff --git a/cmake/dev-mode.cmake b/cmake/dev-mode.cmake index a950b4c..9dc6688 100644 --- a/cmake/dev-mode.cmake +++ b/cmake/dev-mode.cmake @@ -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) diff --git a/src/main.cpp b/src/main.cpp index be42093..71ad863 100644 --- a/src/main.cpp +++ b/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 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 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{ argv, std::next(argv, argc) }); + take_action(args); + }else + take_action(std::vector{ argv, std::next(argv, argc) }); } #endif //General Main