Enable link time optimizations for CMake.
-cmake_minimum_required (VERSION 3.0)
+cmake_minimum_required (VERSION 3.9)
+
+include(CheckIPOSupported)
+check_ipo_supported(RESULT IPO_SUPPORTED)
+if(IPO_SUPPORTED)
+ set_property(TARGET TCOD PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)
+ set_property(TARGET TCOD PROPERTY INTERPROCEDURAL_OPTIMIZATION_DEBUG FALSE)
+endif()
project (libtcod C CXX)
