Use CMake option for asset dir instead of command-line flag
This commit is contained in:
21
README
21
README
@@ -5,24 +5,25 @@ Dependencies:
|
||||
- libxml2 :: https://gitlab.gnome.org/GNOME/libxml2/
|
||||
- SDL2 :: https://www.libsdl.org/
|
||||
|
||||
The build is handled with CMake (version 3.10 or later):
|
||||
The build is handled with CMake (version 3.10 or later). You can
|
||||
specify a path to a directory containing the assets when configuring
|
||||
the build; alternatively it will default to the "assets" directory
|
||||
under the root of the project.
|
||||
|
||||
cmake -B build
|
||||
cmake -Bbuild # -DASSETS_DIR="..."
|
||||
cmake --build build
|
||||
|
||||
The path to a directory containing the assets must be passed on the
|
||||
command line to run the game:
|
||||
You should then be able to run the game:
|
||||
|
||||
build/game/game ASSETS-DIR
|
||||
build/game/game
|
||||
|
||||
|
||||
Hot Reloading
|
||||
|
||||
The engine supports hot reloading of the game code via the F5 key; set
|
||||
the HOTRELOAD option on in CMake to enable it. You also have to run an
|
||||
executable built from the engine rather than the game if using this
|
||||
feature.
|
||||
the HOTRELOAD option on in CMake to enable it. You also have to run
|
||||
the engine executable rather than the game one if using this feature.
|
||||
|
||||
cmake -B build -D HOTRELOAD=ON
|
||||
cmake -Bbuild -DHOTRELOAD=ON
|
||||
cmake --build build
|
||||
build/engine/engine assets/
|
||||
build/engine/engine
|
||||
|
||||
Reference in New Issue
Block a user