Move files into their own directory
This commit is contained in:
parent
ef20432d9d
commit
ea1986c8f2
19 changed files with 8 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
cmake_minimum_required(VERSION 3.17)
|
||||
project(pacman)
|
||||
project(modern_cpp_exercises )
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
|
||||
|
@ -10,5 +10,5 @@ if (NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
|
|||
"${CMAKE_BINARY_DIR}/conan.cmake")
|
||||
endif ()
|
||||
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}/src)
|
||||
add_subdirectory(src)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR}/pacman/src)
|
||||
add_subdirectory(pacman)
|
||||
|
|
1
pacman/CMakeLists.txt
Normal file
1
pacman/CMakeLists.txt
Normal file
|
@ -0,0 +1 @@
|
|||
add_subdirectory(src)
|
Before Width: | Height: | Size: 870 KiB After Width: | Height: | Size: 870 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
@ -8,5 +8,5 @@ find_package(sdl2_image REQUIRED)
|
|||
include_directories(${sdl2_INCLUDE_DIRS} ${sdl2_image_INCLUDE_DIRS})
|
||||
|
||||
file(GLOB_RECURSE sources CONFIGURE_DEPENDS "*.cpp")
|
||||
add_executable(${PROJECT_NAME} ${sources})
|
||||
target_link_libraries(${PROJECT_NAME} sdl2::sdl2 sdl2_image::sdl2_image)
|
||||
add_executable(PacMan ${sources})
|
||||
target_link_libraries(PacMan sdl2::sdl2 sdl2_image::sdl2_image)
|
|
@ -12,8 +12,8 @@ GameWindow::GameWindow(int width, int height) {
|
|||
auto sdl_renderer = createRenderer(sdl_window);
|
||||
createWindowSurface(sdl_window);
|
||||
setDrawColor(sdl_renderer);
|
||||
maze_texture = loadTexture(sdl_renderer, "../../../assets/maze.png");
|
||||
sprite_texture = loadTexture(sdl_renderer, "../../../assets/sprites32.png");
|
||||
maze_texture = loadTexture(sdl_renderer, "../../../../pacman/assets/maze.png");
|
||||
sprite_texture = loadTexture(sdl_renderer, "../../../../pacman/assets/sprites32.png");
|
||||
}
|
||||
|
||||
void GameWindow::update(const PacMan & pacMan, Board board) {
|
Loading…
Reference in a new issue