- Added `wxwidgets` module with a basic application (menu and UI setup in `main.cpp`) and CMake configuration. - Updated `Paddle` class in SFML to support dynamic key bindings and movement logic via `Update` method. - Introduced `asset_ids.h` for centralized asset file definitions in SFML. - Enhanced `sfml/main.cpp` with animation logic and drawable management using `std::vector`. - Adjusted CMake configurations for SFML and added asset copying to runtime directory.
24 lines
679 B
CMake
24 lines
679 B
CMake
cmake_minimum_required(VERSION 3.28)
|
|
project(CMakeSFMLProject LANGUAGES CXX)
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
|
|
|
include(FetchContent)
|
|
FetchContent_Declare(SFML
|
|
GIT_REPOSITORY https://github.com/SFML/SFML.git
|
|
GIT_TAG 3.0.2
|
|
GIT_SHALLOW ON
|
|
EXCLUDE_FROM_ALL
|
|
SYSTEM)
|
|
FetchContent_MakeAvailable(SFML)
|
|
|
|
add_executable(main
|
|
src/main.cpp
|
|
src/Paddle.cpp
|
|
)
|
|
target_compile_features(main PRIVATE cxx_std_17)
|
|
target_link_libraries(main PRIVATE SFML::Graphics)
|
|
|
|
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT main)
|
|
|
|
file(COPY assets DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) |