summary refs log tree commit diff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-04-09 03:35:14 +0200
committerMel <einebeere@gmail.com>2024-04-09 03:35:14 +0200
commitf814ff317f56a95d2449c939b23c577a0fcbeb4e (patch)
tree94c1834ba3a83bfaf138d31909c272547fbbe4e8 /CMakeLists.txt
parent22f3bad59de14b62c6680d10aff2cea5ac5b11dc (diff)
downloadmeowcraft-f814ff317f56a95d2449c939b23c577a0fcbeb4e.tar.zst
meowcraft-f814ff317f56a95d2449c939b23c577a0fcbeb4e.zip
Enable fat LTO for release builds
Diffstat (limited to 'CMakeLists.txt')
-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)