fix for cmakes windows install target, was extracting python 4 times, note install...
authorCampbell Barton <ideasman42@gmail.com>
Mon, 30 May 2011 10:39:18 +0000 (10:39 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 30 May 2011 10:39:18 +0000 (10:39 +0000)
source/creator/CMakeLists.txt

index aea48d88b474f467ee9653d56995955aaf57e64c..6a701129fd1fba5efe60871b7b2194a0d743b547 100644 (file)
@@ -462,10 +462,11 @@ elseif(WIN32)
                        PATTERN "__pycache__" EXCLUDE
                )
 
-               # TODO, multiple targets?
-               install(FILES ${LIBDIR}/python/lib/python32.dll DESTINATION ${TARGETDIR} CONFIGURATIONS Release)
-               install(FILES ${LIBDIR}/python/lib/python32.dll DESTINATION ${TARGETDIR} CONFIGURATIONS RelWithDebInfo)
-               install(FILES ${LIBDIR}/python/lib/python32.dll DESTINATION ${TARGETDIR} CONFIGURATIONS MinSizeRel)
+               install(
+                       FILES ${LIBDIR}/python/lib/python32.dll
+                       DESTINATION ${TARGETDIR}
+                       CONFIGURATIONS Release;RelWithDebInfo;MinSizeRel
+               )
 
                install(
                        FILES ${LIBDIR}/python/lib/python32_d.dll
@@ -490,34 +491,14 @@ elseif(WIN32)
                        install(
                                CODE
                                "
-                               execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
-                                       \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\")
-                               "
-                               CONFIGURATIONS Release
-                       )
-                       install(
-                               CODE
-                               "
-                               execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
-                                       \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\")
-                               "
-                               CONFIGURATIONS RelWithDebInfo
-                       )
-                       install(
-                               CODE
-                               "
-                               execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
-                                       \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\")
-                               "
-                               CONFIGURATIONS MinSizeRel
-                       )
-                       install(
-                               CODE
-                               "
-                               execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
-                                       \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32_d.tar.gz\")
+                               if(\"\${CMAKE_INSTALL_CONFIG_NAME}\" STREQUAL \"Debug\")
+                                       execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
+                                               \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32_d.tar.gz\")
+                               else()
+                                       execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib\"
+                                               \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\")
+                               endif()
                                "
-                               CONFIGURATIONS Debug
                        )
 
                        # doesnt work, todo