Skip to content

Commit

Permalink
Use SFML 3
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Oct 23, 2023
1 parent 1faab78 commit fb5a662
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
include(FetchContent)
FetchContent_Declare(SFML
GIT_REPOSITORY https://github.com/SFML/SFML.git
GIT_TAG 2.6.x)
GIT_TAG master)
FetchContent_MakeAvailable(SFML)

add_executable(CMakeSFMLProject src/main.cpp)
target_link_libraries(CMakeSFMLProject PRIVATE sfml-graphics)
target_compile_features(CMakeSFMLProject PRIVATE cxx_std_17)
target_link_libraries(CMakeSFMLProject PRIVATE SFML::Graphics)

if(WIN32)
add_custom_command(
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int main()
{
auto window = sf::RenderWindow{ { 1920u, 1080u }, "CMake SFML Project" };
auto window = sf::RenderWindow{ sf::VideoMode{ { 1920u, 1080u } }, "CMake SFML Project" };
window.setFramerateLimit(144);

while (window.isOpen())
Expand All @@ -18,4 +18,4 @@ int main()
window.clear();
window.display();
}
}
}

0 comments on commit fb5a662

Please sign in to comment.