FlappyBird/CMakeLists.txt
patrick_pluto e518e31fc7 CMake
2024-09-08 19:27:33 +02:00

23 lines
589 B
CMake

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})