浏览代码

Merge pull request #1590 from aavenel/fix-cmake-unit-win

Copy assimp dll to unit folder on windows
Kim Kulling 7 年之前
父节点
当前提交
44b38263a5
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      test/CMakeLists.txt

+ 7 - 0
test/CMakeLists.txt

@@ -177,6 +177,13 @@ ELSE( WIN32 )
     SET( platform_libs pthread )
     SET( platform_libs pthread )
 ENDIF( WIN32 )
 ENDIF( WIN32 )
 
 
+IF( WIN32 )
+  ADD_CUSTOM_COMMAND(TARGET unit
+    PRE_BUILD
+    COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:assimp> $<TARGET_FILE_DIR:unit>
+    MAIN_DEPENDENCY assimp)
+ENDIF( WIN32 )
+
 IF(MSVC)
 IF(MSVC)
 		add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 		add_definitions(-D_CRT_SECURE_NO_WARNINGS)
 ENDIF(MSVC)
 ENDIF(MSVC)