summaryrefslogtreecommitdiffstats
path: root/unityplugin/GhostCubePlugin/PluginSource
diff options
context:
space:
mode:
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})