If you want to use CLIEngine in your (local) project:
CLIEngine
CMakeLists.txt
cmake_minimum_required(VERSION 3.22) set(CMAKE_CXX_STANDARD 11) project(MyProject LANGUAGES CXX) include(FetchContent) FetchContent_Declare(CLIEngine GIT_REPOSITORY https://github.com/Ootzk/CLIEngine.git GIT_TAG v0.4.1 GIT_PROGRESS TRUE GIT_SHALLOW TRUE ) FetchContent_MakeAvailable(CLIEngine) set(SOURCES main.cpp ) add_executable(myproject ${SOURCES}) target_include_directories(myproject PRIVATE ${CLIEngine_SOURCE_DIR}/include) target_link_libraries(myproject PRIVATE cli_engine) # cli_engine is alias defined in CLIEngine
main.cpp
#include "CLIEngine/core.hpp" int main() { CLIEngine::setPalette(CLIEngine::Color::RED, CLIEngine::Color::WHITE); std::cout << "hello world" << x << endl; CLIEngine::setPalette(); // for more examples, refer wiki. }
There was an error while loading. Please reload this page.