Skip to content

Commit 4879b2c

Browse files
committed
Fix cmakelists
1 parent b9e4459 commit 4879b2c

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,10 @@ file(GLOB source_files
1010
set(SOURCES ${source_files})
1111

1212
# Detect and add SFML
13-
set(SFML_STATIC_LIBRARIES TRUE)
1413
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake_modules" ${CMAKE_MODULE_PATH})
1514
find_package(SFML 2 REQUIRED COMPONENTS network audio graphics window system)
1615

1716
add_executable(${PROJECT_NAME} ${SOURCES})
18-
add_definitions(-DSFML_STATIC)
1917
target_include_directories(${PROJECT_NAME} PRIVATE "include" "lib")
2018
target_link_libraries(${PROJECT_NAME} sfml-system sfml-window sfml-graphics)
2119
if (UNIX)

src/display_manager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ void DisplayManager::processEvents()
8585
switch (event.type)
8686
{
8787
case sf::Event::KeyPressed:
88+
if (event.type == sf::Event::Closed) m_window.close();
8889
if (event.key.code == sf::Keyboard::Escape) m_window.close();
8990
else if ((event.key.code == sf::Keyboard::Subtract)) zoom(0.8f);
9091
else if ((event.key.code == sf::Keyboard::Add)) zoom(1.2f);

src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ int main()
1010
{
1111
sf::ContextSettings settings;
1212
settings.antialiasingLevel = 8;
13-
sf::RenderWindow window(sf::VideoMode(Conf<>::WIN_WIDTH, Conf<>::WIN_HEIGHT), "AntSim", sf::Style::Fullscreen, settings);
13+
sf::RenderWindow window(sf::VideoMode(Conf<>::WIN_WIDTH, Conf<>::WIN_HEIGHT), "AntSim", sf::Style::Default, settings);
1414
window.setFramerateLimit(60);
1515

1616
Conf<>::loadTextures();

0 commit comments

Comments
 (0)