Skip to content

Commit

Permalink
Fix assets
Browse files Browse the repository at this point in the history
  • Loading branch information
ClawmanCat authored Jan 11, 2024
1 parent acefdc2 commit f35a9dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DemoExecutable/tests/check_for_cat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace fs = std::filesystem;


int main() {
const auto cat_path = fs::absolute(fs::path { "./assets/DemoExecutable/cat_pictures/cat.png" });
const auto cat_path = fs::absolute(fs::path { DEMO_EXECUTABLE_ASSETS_DIR "/cat_pictures/cat.png" });
std::cout << "Checking for the existence of " << cat_path.string() << std::endl;

if (fs::exists(cat_path)) return EXIT_SUCCESS;
Expand Down
3 changes: 3 additions & 0 deletions cmake/create_target.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ FUNCTION(CREATE_TARGET_FROM_SOURCES NAME MAJOR MINOR PATCH CMAKE_TARGET_TYPE COM


IF (EXISTS "${ASSETS_SRC}" AND IS_DIRECTORY "${ASSETS_SRC}")
TARGET_COMPILE_DEFINITIONS(${NAME} PUBLIC "${NAME_UPPER}_ASSETS_DIR=\"${ASSETS_DST}/${NAME}\"")


IF (SYMLINK_ASSETS)
FILE(MAKE_DIRECTORY "${ASSETS_DST}")

Expand Down

0 comments on commit f35a9dd

Please sign in to comment.