diff --git a/.gitignore b/.gitignore index 8b04cd9..a877eb5 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,5 @@ *.app # Build files -build/ \ No newline at end of file +build/ +.vscode/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e841582 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.5) +find_program(CMAKE_C_COMPILER NAMES $ENV{CC} gcc PATHS ENV PATH NO_DEFAULT_PATH) +find_program(CMAKE_CXX_COMPILER NAMES $ENV{CXX} g++ PATHS ENV PATH NO_DEFAULT_PATH) +project(owo) +add_executable(owo src/main.cpp) +target_link_libraries(owo) diff --git a/README.md b/README.md index 2596cdf..8b7330e 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,11 @@ $ ./owo -o output.txt "Hello, world!" ``` ## Building -to build the program, you will need a c++ compiler. I have no idea what im doing with cmake so this uses a very basic make file that is made to build the linux and windows binaries. -If you are on windows, good luck. I have no clue how to setup g++ on windows. I would recommend using WSL or a VM. If you are on linux, you can build the program with the following commands -(assuming you have g++ installed): ```bash +$ cmake . -B build +$ cd build && make $ make -$ build/owo "Hello, world!" +$ ./owo "Hello, world!" hewwo, wowld! ```