From 26cc27e45f811ec48993b13c398af324a842e0f0 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 9 Dec 2017 22:46:45 -0800 Subject: Updated cmake lists: enabled link-time code generation for MSVC --- Graphics/GraphicsEngineOpenGL/CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt index 6294beb6..acd9f191 100644 --- a/Graphics/GraphicsEngineOpenGL/CMakeLists.txt +++ b/Graphics/GraphicsEngineOpenGL/CMakeLists.txt @@ -159,6 +159,21 @@ set_target_properties(GraphicsEngineOpenGL-shared PROPERTIES OUTPUT_NAME_MINSIZEREL GraphicsEngineOpenGL${DLL_REL_SUFFIX} ) +if(MSVC) + # Enable link-time code generation for release builds (I was not able to + # find any way to set these settings through interface library BuildSettings) + set_target_properties(GraphicsEngineOpenGL-shared PROPERTIES + LINK_FLAGS_RELEASE /LTCG + LINK_FLAGS_MINSIZEREL /LTCG + LINK_FLAGS_RELWITHDEBINFO /LTCG + ) + set_target_properties(GraphicsEngineOpenGL-static PROPERTIES + STATIC_LIBRARY_FLAGS_RELEASE /LTCG + STATIC_LIBRARY_FLAGS_MINSIZEREL /LTCG + STATIC_LIBRARY_FLAGS_RELWITHDEBINFO /LTCG + ) +endif() + source_group("src" FILES ${SOURCE} src/DLLMain.cpp -- cgit v1.2.3