Input / Output library for the PRG1F course
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>
There is an example here: example.
If you want to change how libdio
works in your local directory, you can do the following:
- Clone the libdio repo locally
- 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!
(Les images ont été prises durant la beta et ne sont pas représentatives du produit final)