summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a418b7c..649bd6f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,6 +92,10 @@ add_executable(meowcraft
src/Input.cpp src/Input.hpp
)
+# Enable LTO for release builds
+set_property(TARGET meowcraft PROPERTY
+ INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE)
+
if (WIN32)
set(LINK_FLAGS "-static-libgcc -static-libstdc++ -static -mwindows")
endif (WIN32)