Skip to content

Commit

Permalink
Merge pull request #1565 from heinezen/fix/missing-asset-folders
Browse files Browse the repository at this point in the history
Add missing asset directories to CMakeLists
  • Loading branch information
TheJJ authored Oct 8, 2023
2 parents 01c1cf7 + f54d802 commit 1d08ffa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assets/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright 2023-2023 the openage authors. See copying.md for legal info.

add_subdirectory(nyan/)
add_subdirectory(qml/)
add_subdirectory(shaders/)
add_subdirectory(textures/)
4 changes: 4 additions & 0 deletions assets/test/nyan/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
install(DIRECTORY "."
DESTINATION "${ASSET_DIR}/test/nyan"
FILES_MATCHING PATTERN "*.nyan"
)
4 changes: 4 additions & 0 deletions assets/test/qml/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
install(DIRECTORY "."
DESTINATION "${ASSET_DIR}/test/qml"
FILES_MATCHING PATTERN "*.qml"
)
3 changes: 3 additions & 0 deletions libopenage/presenter/presenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,19 @@ void Presenter::init_gui() {
//// -- gui initialization
// TODO: Do not use test GUI
util::Path qml_root = this->root_dir / "assets" / "test" / "qml";
log::log(INFO << "Presenter: Setting QML root to " << qml_root.resolve_native_path());
if (not qml_root.is_dir()) {
throw Error{ERR << "could not find qml root folder " << qml_root};
}

util::Path qml_assets = this->root_dir / "assets";
log::log(INFO << "Presenter: Setting QML asset path to " << qml_assets.resolve_native_path());
if (not qml_assets.is_dir()) {
throw Error{ERR << "could not find asset root folder " << qml_assets};
}

util::Path qml_root_file = qml_root / "main.qml";
log::log(INFO << "Presenter: Setting QML root file to " << qml_root_file.resolve_native_path());
if (not qml_root_file.is_file()) {
throw Error{ERR << "could not find main.qml file " << qml_root_file};
}
Expand Down

0 comments on commit 1d08ffa

Please sign in to comment.