fix for cmake / windows from mont29 on IRC.
authorCampbell Barton <ideasman42@gmail.com>
Fri, 1 Apr 2011 06:39:19 +0000 (06:39 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 1 Apr 2011 06:39:19 +0000 (06:39 +0000)
source/creator/CMakeLists.txt

index b25cac7bf78cf8782e151fca3e5c845a1c905213..7e30e19a73fb19170f81c9972dc89fc10d15894e 100644 (file)
@@ -547,19 +547,20 @@ elseif(WIN32)
                        )
                endif()
        endif()
-       
-       add_custom_command(TARGET blender
-               POST_BUILD
-               MAIN_DEPENDENCY blender
-               COMMAND copy /Y \"${LIBDIR}\\thumbhandler\\lib\\BlendThumb64.dll\" \"${TARGETDIR}\\\"
-       )
-       if(NOT CMAKE_CL_64)
-               add_custom_command(TARGET blender
-                       POST_BUILD
-                       MAIN_DEPENDENCY blender
-                       COMMAND copy /Y \"${LIBDIR}\\thumbhandler\\lib\\BlendThumb.dll\" \"${TARGETDIR}\\\"
-               )
-       endif()
+
+    if(NOT CMAKE_CL_64)
+               install(
+                       FILES
+               ${LIBDIR}/thumbhandler/lib/BlendThumb.dll
+               DESTINATION ${TARGETDIR}/
+           )
+    else()
+               install(
+                       FILES
+               ${LIBDIR}/thumbhandler/lib/BlendThumb64.dll
+               DESTINATION ${TARGETDIR}/
+           )
+    endif()
 
 elseif(APPLE)
        set(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app)