From 916c8a596d0ce7a0caa2ef484f24b25a5bffcd2d Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Mon, 11 Dec 2017 23:50:26 -0800 Subject: Added cmake command to copy GhostCubePlugin to Unity plugin folder --- .../GhostCubePlugin/PluginSource/CMakeLists.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'unityplugin/GhostCubePlugin/PluginSource') 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 + "\"$\"" + "${UNITY_PLUGIN_PATH}" + ) + endif() source_group("src" FILES ${SOURCE}) -- cgit v1.2.3