24 lines
589 B
Text
24 lines
589 B
Text
|
cmake_minimum_required(VERSION 3.10)
|
||
|
|
||
|
# Set the project name
|
||
|
project(FlappyBird)
|
||
|
|
||
|
# Find the SDL2 and SDL2_image packages
|
||
|
find_package(SDL2 REQUIRED)
|
||
|
find_package(SDL2_image REQUIRED)
|
||
|
|
||
|
# Specify the source files
|
||
|
set(SRCS main.cpp)
|
||
|
|
||
|
# Create the executable
|
||
|
add_executable(${PROJECT_NAME} ${SRCS})
|
||
|
|
||
|
# Link the SDL2 and SDL2_image libraries
|
||
|
target_link_libraries(${PROJECT_NAME} SDL2::SDL2 SDL2_image::SDL2_image)
|
||
|
|
||
|
# Specify the assets directory
|
||
|
set(ASSETS_DIR ${CMAKE_SOURCE_DIR}/assets)
|
||
|
|
||
|
# Copy assets to the build directory
|
||
|
file(COPY ${ASSETS_DIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|