Merge remote-tracking branch 'origin/master'
commit
4cc88602e1
|
@ -0,0 +1,3 @@
|
|||
build
|
||||
.venv
|
||||
CMakeUserPresets.json
|
|
@ -0,0 +1,10 @@
|
|||
cmake_minimum_required(VERSION 3.28)
|
||||
project(ncurses_demo1)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
find_package(Curses REQUIRED)
|
||||
|
||||
add_executable(ncurses_demo1 src/main.cpp)
|
||||
target_include_directories(ncurses_demo1 PUBLIC ${Curses_INCLUDE_DIRS})
|
||||
target_link_libraries(ncurses_demo1 Curses::Curses)
|
|
@ -0,0 +1,21 @@
|
|||
# NCurses Demo1
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
python -m venv .venv
|
||||
source $(readlink -f .venv/bin/activate)
|
||||
python -m pip install conan
|
||||
conan install conanfile.py --build=missing
|
||||
cmake ../../ -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_VERBOSE_MAKEFILE=true
|
||||
make
|
||||
```
|
||||
|
||||
## Running
|
||||
|
||||
in build/Release run ./ncurses_demo1
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Sometimes you can issue with opening terminal xterm-*
|
||||
Check TERMINFO if they point correctly or you have properly set ~/.terminfo (you can symlink it)
|
|
@ -0,0 +1,12 @@
|
|||
from conan import ConanFile
|
||||
from conan.tools.cmake import cmake_layout
|
||||
|
||||
class NcursesDemo1(ConanFile):
|
||||
settings = "os", "compiler", "build_type", "arch"
|
||||
generators = "CMakeDeps", "CMakeToolchain"
|
||||
|
||||
def requirements(self):
|
||||
self.requires("ncurses/6.5")
|
||||
|
||||
def layout(self):
|
||||
cmake_layout(self)
|
|
@ -0,0 +1,14 @@
|
|||
#include <ncurses.h>
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
initscr();
|
||||
|
||||
printw("Hello World!");
|
||||
refresh();
|
||||
|
||||
getch();
|
||||
|
||||
endwin();
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue