summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-10 06:46:45 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-10 06:46:45 +0000
commit26cc27e45f811ec48993b13c398af324a842e0f0 (patch)
treed6cec1e2478e8ff46ade5bf5d129f371cab5bae1 /Graphics/GraphicsEngineD3D12
parentFixed tolower()-related warnings (diff)
downloadDiligentCore-26cc27e45f811ec48993b13c398af324a842e0f0.tar.gz
DiligentCore-26cc27e45f811ec48993b13c398af324a842e0f0.zip
Updated cmake lists: enabled link-time code generation for MSVC
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/CMakeLists.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineD3D12/CMakeLists.txt b/Graphics/GraphicsEngineD3D12/CMakeLists.txt
index d8876e43..cc18526e 100644
--- a/Graphics/GraphicsEngineD3D12/CMakeLists.txt
+++ b/Graphics/GraphicsEngineD3D12/CMakeLists.txt
@@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.3)
-project(GraphicsEngineD3D12)
+project(GraphicsEngineD3D12 CXX)
set(INCLUDE
include/BufferD3D12Impl.h
@@ -178,6 +178,22 @@ set_target_properties(GraphicsEngineD3D12-shared PROPERTIES
OUTPUT_NAME_MINSIZEREL GraphicsEngineD3D12${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(GraphicsEngineD3D12-shared PROPERTIES
+ LINK_FLAGS_RELEASE /LTCG
+ LINK_FLAGS_MINSIZEREL /LTCG
+ LINK_FLAGS_RELWITHDEBINFO /LTCG
+ )
+ set_target_properties(GraphicsEngineD3D12-static PROPERTIES
+ STATIC_LIBRARY_FLAGS_RELEASE /LTCG
+ STATIC_LIBRARY_FLAGS_MINSIZEREL /LTCG
+ STATIC_LIBRARY_FLAGS_RELWITHDEBINFO /LTCG
+ )
+endif()
+
+
source_group("src" FILES
${SRC}
)