Skip to content

Commit 5de63b1

Browse files
committed
update
1 parent b0885b8 commit 5de63b1

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ set(SDL3IMAGE_BUILD_SHARED_LIBS OFF)
1616

1717
if (NOT MSVC AND CMAKE_BUILD_TYPE STREQUAL "Release")
1818
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -funroll-loops")
19-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static -static-libgcc -static-libstdc++")
20-
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native")
19+
if (WIN32)
20+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static -static-libgcc -static-libstdc++")
21+
else()
22+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -mtune=native")
23+
endif()
2124
endif()
2225

2326
# SFML dependencies:

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,11 @@
22
SFML-based Conway's Game of Life simulation in C++
33

44
![](/screenshot.png?raw=true)
5+
6+
```
7+
mkdir build
8+
cd build
9+
cmake .. -DCMAKE_BUILD_TYPE=Release
10+
make -j$(nproc)
11+
./gameoflife-sfml
12+
```

main-sfml.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ int main()
141141
"C:\\Windows\\Fonts\\Arial.ttf",
142142
#else
143143
"/usr/share/fonts/gnu-free/FreeSans.ttf",
144+
"/usr/share/fonts/truetype/freefont/FreeSans.ttf",
144145
"/usr/share/fonts/truetype/msttcorefonts/arial.ttf",
145146
#endif
146147
};

0 commit comments

Comments
 (0)