summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-14 04:04:39 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-14 04:04:39 +0000
commitfe150555cb15e905b080ce7e85a20fdcb01e9259 (patch)
treeb21ff8f63930b7a4515b34683d7e89ba49744403
parentAdding UWP to CMake (in progress) (diff)
downloadDiligentEngine-fe150555cb15e905b080ce7e85a20fdcb01e9259.tar.gz
DiligentEngine-fe150555cb15e905b080ce7e85a20fdcb01e9259.zip
Optimized CMake files with set_common_target_properties()
m---------DiligentCore0
m---------DiligentSamples0
m---------DiligentTools0
-rw-r--r--Projects/Asteroids/CMakeLists.txt9
-rw-r--r--unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt9
-rw-r--r--unityplugin/GhostCubeScene/CMakeLists.txt8
-rw-r--r--unityplugin/UnityEmulator/CMakeLists.txt9
7 files changed, 6 insertions, 29 deletions
diff --git a/DiligentCore b/DiligentCore
-Subproject ca792090564a12ab85ffcf77f3054d5d6bf3330
+Subproject a11be18c81e81210984508f5f86911ef453cbb3
diff --git a/DiligentSamples b/DiligentSamples
-Subproject 73bf3975506e2cf85ed0562dd4007f6f8988302
+Subproject 90d2d0013b43069e9d544c42b36386d940c6fa2
diff --git a/DiligentTools b/DiligentTools
-Subproject fd8cced335c46f2228fb0b6abb124168bb9e060
+Subproject 2d81c45170588995c346bf324b2154c4ef59efb
diff --git a/Projects/Asteroids/CMakeLists.txt b/Projects/Asteroids/CMakeLists.txt
index 8a3be34..0849b38 100644
--- a/Projects/Asteroids/CMakeLists.txt
+++ b/Projects/Asteroids/CMakeLists.txt
@@ -145,6 +145,8 @@ PRIVATE
shcore.lib
)
+set_common_target_properties(Asteroids)
+
if(MSVC)
set_header_file_only_property("${SHADERS}")
@@ -153,13 +155,6 @@ if(MSVC)
# - w4324: structure was padded due to alignment specifier
# - w4238: nonstandard extension used: class rvalue used as lvalue
target_compile_options(Asteroids PRIVATE /wd4201 /wd4324 /wd4238)
- # 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(Asteroids PROPERTIES
- LINK_FLAGS_RELEASE /LTCG
- LINK_FLAGS_MINSIZEREL /LTCG
- LINK_FLAGS_RELWITHDEBINFO /LTCG
- )
endif()
source_group("src" FILES ${SOURCE})
diff --git a/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt b/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt
index b1eda3b..3430357 100644
--- a/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt
+++ b/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt
@@ -84,6 +84,8 @@ if(GL_SUPPORTED OR GLES_SUPPORTED)
target_link_libraries(GhostCubePlugin-shared PRIVATE GraphicsEngineOpenGL-static)
endif()
+set_common_target_properties(GhostCubePlugin-shared)
+
if(MSVC)
# Disable MSVC-specific warnings
# - w4201: nonstandard extension used: nameless struct/unio
@@ -91,13 +93,6 @@ if(MSVC)
if(PLATFORM_UNIVERSAL_WINDOWS)
target_compile_definitions(GhostCubePlugin-shared PRIVATE WINDOWS_UWP UNITY_METRO)
endif()
- # 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(GhostCubePlugin-shared PROPERTIES
- LINK_FLAGS_RELEASE /LTCG
- LINK_FLAGS_MINSIZEREL /LTCG
- LINK_FLAGS_RELWITHDEBINFO /LTCG
- )
if(PLATFORM_WIN32)
if(WIN64)
diff --git a/unityplugin/GhostCubeScene/CMakeLists.txt b/unityplugin/GhostCubeScene/CMakeLists.txt
index aa7860c..cdf461d 100644
--- a/unityplugin/GhostCubeScene/CMakeLists.txt
+++ b/unityplugin/GhostCubeScene/CMakeLists.txt
@@ -59,18 +59,12 @@ PRIVATE
UnityEmulator
TargetPlatform
)
+set_common_target_properties(GhostCubeScene)
if(MSVC)
# Disable MSVC-specific warnings
# - w4201: nonstandard extension used: nameless struct/unio
target_compile_options(GhostCubeScene PRIVATE /wd4201)
- # 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(GhostCubeScene PROPERTIES
- LINK_FLAGS_RELEASE /LTCG
- LINK_FLAGS_MINSIZEREL /LTCG
- LINK_FLAGS_RELWITHDEBINFO /LTCG
- )
endif()
source_group("src" FILES ${SOURCE})
diff --git a/unityplugin/UnityEmulator/CMakeLists.txt b/unityplugin/UnityEmulator/CMakeLists.txt
index da260a4..21b59a9 100644
--- a/unityplugin/UnityEmulator/CMakeLists.txt
+++ b/unityplugin/UnityEmulator/CMakeLists.txt
@@ -90,6 +90,7 @@ endif()
add_library(UnityEmulator STATIC ${SOURCE} ${INCLUDE})
+set_common_target_properties(UnityEmulator)
target_include_directories(UnityEmulator
PRIVATE
@@ -100,14 +101,6 @@ PUBLIC
if(MSVC)
target_compile_options(UnityEmulator PRIVATE -DUNICODE)
-
- # 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(UnityEmulator PROPERTIES
- STATIC_LIBRARY_FLAGS_RELEASE /LTCG
- STATIC_LIBRARY_FLAGS_MINSIZEREL /LTCG
- STATIC_LIBRARY_FLAGS_RELWITHDEBINFO /LTCG
- )
endif()
target_link_libraries(UnityEmulator