-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added lib nlohmann/json - improved its modularity
- Loading branch information
Showing
9 changed files
with
59 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
add_library(${PALPATINE_LIB} STATIC Palpatine.cpp File.cpp) | ||
add_library(${PALPATINE_LIB} STATIC | ||
"Palpatine.cpp" | ||
"File.cpp" | ||
"Utils.cpp") | ||
|
||
target_include_directories(${PALPATINE_LIB} PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR} # same as " ./ " # the header files | ||
${CMAKE_BINARY_DIR}/configured_files/include | ||
) | ||
target_link_libraries(${PALPATINE_LIB} PUBLIC | ||
termcolor | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "Utils.h" | ||
#include "config.hpp" | ||
#include <iostream> | ||
#include <termcolor/termcolor.hpp> | ||
|
||
namespace utils_sdds { | ||
void print_banner() { | ||
std::system("clear"); | ||
std::cout << termcolor::on_grey << termcolor::bold << termcolor::white | ||
<< " palpatine " << termcolor::reset << " v" << project_version | ||
<< termcolor::dark << termcolor::reset << termcolor::bold | ||
<< " Made with " << termcolor::red << "❤" << termcolor::reset | ||
<< " by " | ||
<< "Batuhan Ipci" << termcolor::reset << std::endl; | ||
// description | ||
std::cout << termcolor::dark << project_description << termcolor::reset | ||
<< std::endl; | ||
std::cout << std::endl; | ||
} | ||
|
||
void print_error(const std::runtime_error &err) { | ||
std::cerr << termcolor::red << termcolor::bold << err.what() | ||
<< termcolor::reset << std::endl; | ||
} | ||
|
||
void print_location(const std::string &location) { | ||
std::cout << termcolor::green << "Created at: " << termcolor::reset | ||
<< location << "/dist" << std::endl; | ||
} | ||
} // namespace utils_sdds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
#include <iostream> | ||
|
||
namespace utils_sdds { | ||
void print_banner(); | ||
void print_error(const std::runtime_error &err); | ||
void print_location(const std::string &location); | ||
|
||
} // namespace utils_sdds |