/prg1f-io

Input / Output library for the PRG1F course

Primary LanguageC++Mozilla Public License 2.0MPL-2.0

libdio

Input / Output library for the PRG1F course

Usage

To use this library in your code, you have to add the following lines in your CMakeLists.txt:

include(FetchContent) # once in the project to include the module

FetchContent_Declare(libdio
        GIT_REPOSITORY https://github.com/HEIGVD-PRG1-F-2022/libdio.git
        GIT_TAG v0.2.0
        )
FetchContent_MakeAvailable(libdio)

# Here are your other declarations, like `add_executable`

# Replace `PROJECT` with the name of your executable
target_link_libraries(PROJECT PRIVATE libdio)

Now you can do the following to include the library in your files:

#include <libdio/display.h>
#include <libdio/input.h>

Examples

There is an example here: example.

Develop libdio locally

If you want to change how libdio works in your local directory, you can do the following:

  1. Clone the libdio repo locally
  2. Change the code for CMakeLists.txt to the following:
add_subdirectory(libdio)
# Here are your other declarations, like `add_executable`

# Replace `PROJECT` with the name of your executable
target_link_libraries(PROJECT PRIVATE libdio)

Please don't forget to create a pull-request with your changes!

Images

(Les images ont été prises durant la beta et ne sont pas représentatives du produit final)

image

image