From 84beedbf263cb6f26fa453386899120b96b9de79 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 9 Dec 2017 22:47:51 -0800 Subject: Updated cmake lists: enabled link-time code generation for MSVC --- TextureLoader/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'TextureLoader') diff --git a/TextureLoader/CMakeLists.txt b/TextureLoader/CMakeLists.txt index 3899618..74ecde0 100644 --- a/TextureLoader/CMakeLists.txt +++ b/TextureLoader/CMakeLists.txt @@ -34,6 +34,16 @@ source_group("include" FILES ${INCLUDE}) target_link_libraries(TextureLoader PRIVATE BuildSettings Common PlatformInterface GraphicsEngine GraphicsTools LibJpeg LibPng LibTiff Lua ZLib) +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(TextureLoader PROPERTIES + STATIC_LIBRARY_FLAGS_RELEASE /LTCG + STATIC_LIBRARY_FLAGS_MINSIZEREL /LTCG + STATIC_LIBRARY_FLAGS_RELWITHDEBINFO /LTCG + ) +endif() + set_target_properties(TextureLoader PROPERTIES FOLDER Tools ) \ No newline at end of file -- cgit v1.2.3