summaryrefslogtreecommitdiffstats
path: root/unityplugin/GhostCubePlugin/PluginSource
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-12 07:50:26 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-12 07:50:26 +0000
commit916c8a596d0ce7a0caa2ef484f24b25a5bffcd2d (patch)
tree33463199915fa0463f916089318c085300ecb895 /unityplugin/GhostCubePlugin/PluginSource
parentAdded CMake files for Unity plugin & Emulator (diff)
downloadDiligentEngine-916c8a596d0ce7a0caa2ef484f24b25a5bffcd2d.tar.gz
DiligentEngine-916c8a596d0ce7a0caa2ef484f24b25a5bffcd2d.zip
Added cmake command to copy GhostCubePlugin to Unity plugin folder
Diffstat (limited to 'unityplugin/GhostCubePlugin/PluginSource')
-rw-r--r--unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt22
1 files changed, 22 insertions, 0 deletions
diff --git a/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt b/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt
index fd1d880..8fa2d1e 100644
--- a/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt
+++ b/unityplugin/GhostCubePlugin/PluginSource/CMakeLists.txt
@@ -95,6 +95,28 @@ if(MSVC)
LINK_FLAGS_MINSIZEREL /LTCG
LINK_FLAGS_RELWITHDEBINFO /LTCG
)
+
+ if(PLATFORM_WIN32)
+ if(WIN64)
+ set(UNITY_PLUGIN_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../UnityProject/Assets/Plugins/x86_64/GhostCubePlugin.dll)
+ else()
+ set(UNITY_PLUGIN_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../UnityProject/Assets/Plugins/x86/GhostCubePlugin.dll)
+ endif()
+ elseif(PLATFORM_UNIVERSAL_WINDOWS)
+ if(WIN64)
+ set(UNITY_PLUGIN_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../UnityProject/Assets/Plugins/Metro/UWP/x86_64/GhostCubePlugin.dll)
+ else()
+ set(UNITY_PLUGIN_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../UnityProject/Assets/Plugins/Metro/UWP/x86/GhostCubePlugin.dll)
+ endif()
+ elseif(PLATFORM_ANDROID)
+ set(UNITY_PLUGIN_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../UnityProject/Assets/Plugins/Android/libGhostCubePlugin.so)
+ endif()
+ add_custom_command(TARGET GhostCubePlugin-shared POST_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "\"$<TARGET_FILE:GhostCubePlugin-shared>\""
+ "${UNITY_PLUGIN_PATH}"
+ )
+
endif()
source_group("src" FILES ${SOURCE})