CMakeList cleanup and import fix
This commit is contained in:
parent
9b57ca68c6
commit
7cbc525dc6
4 changed files with 9 additions and 7 deletions
|
@ -1,9 +1,11 @@
|
||||||
|
file(GLOB_RECURSE flappy_bird_src "*.cpp")
|
||||||
|
file(GLOB_RECURSE flappy_bird_lib "lib/*.hpp" "lib/*.h")
|
||||||
|
file(GLOB_RECURSE flappy_bird_assets "assets/*")
|
||||||
|
|
||||||
add_executable(paradiso_flappy_bird flappy_bird.cpp image_loader.hpp image_loader.cpp lib/stb_image.h)
|
add_executable(flappy_bird ${flappy_bird_src} ${flappy_bird_lib})
|
||||||
|
target_link_libraries(flappy_bird paradiso_core)
|
||||||
|
|
||||||
target_link_libraries(paradiso_flappy_bird paradiso_core)
|
add_custom_command(TARGET flappy_bird POST_BUILD
|
||||||
|
|
||||||
add_custom_command(TARGET paradiso_flappy_bird POST_BUILD
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
COMMAND ${CMAKE_COMMAND} -E copy_directory
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/assets/ $<TARGET_FILE_DIR:paradiso_flappy_bird>/assets)
|
${CMAKE_CURRENT_SOURCE_DIR}/assets/ $<TARGET_FILE_DIR:flappy_bird>/assets)
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "image_loader.hpp"
|
#include "lib/image_loader.hpp"
|
||||||
|
|
||||||
struct Background {
|
struct Background {
|
||||||
paradiso::Sprite backgroundLeft;
|
paradiso::Sprite backgroundLeft;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
#include "lib/stb_image.h"
|
#include "lib/stb_image.h"
|
||||||
|
|
||||||
#include "image_loader.hpp"
|
#include "lib/image_loader.hpp"
|
||||||
|
|
||||||
std::unordered_map<std::string, paradiso::Bitmap> image_loader::image_cache =
|
std::unordered_map<std::string, paradiso::Bitmap> image_loader::image_cache =
|
||||||
std::unordered_map<std::string, paradiso::Bitmap>();
|
std::unordered_map<std::string, paradiso::Bitmap>();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue