From fe150555cb15e905b080ce7e85a20fdcb01e9259 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 13 Dec 2017 20:04:39 -0800 Subject: Optimized CMake files with set_common_target_properties() --- unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'unityplugin/GhostCubePlugin/PluginSource') 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) -- cgit v1.2.3