diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-03-10 03:12:06 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-03-10 03:12:06 +0300 |
commit | 4ef2d32b725c5bf834a830e5385976887723b404 (patch) | |
tree | 5a5c8c7bb2797f488c192b2f7ef92117b31344de /source/creator | |
parent | 17564249bb4c4a517b5dce8ba193e2f60977272c (diff) |
untarring of Python 3.2 tarballs would fail if CMake was installed into path with spaces. Slightly
change how the extraction commands are presented (old BUILD_TYPE was empty all the time here) and
ensure also that python/lib subdir under versioned dir gets actually created.
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/CMakeLists.txt | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index f22e55204f2..1ef86d3d808 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -413,27 +413,46 @@ if(WITH_INSTALL) if(WITH_PYTHON_INSTALL) #~ # note, as far as python is concerned 'RelWithDebInfo' is not debug since its without debug flags. - # install(CODE "message(\"copying a subset of the systems python...\")") + + # create the directory in multiple steps, so it actually gets created when it doesn't exist yet + install(CODE " + message(\"creating ${TARGETDIR_VER}/python/lib\") + file(MAKE_DIRECTORY ${TARGETDIR_VER}/python/) + file(MAKE_DIRECTORY ${TARGETDIR_VER}/python/lib/) + message(\"done creating dir\") + ") install( CODE - "execute_process(COMMAND ${CMAKE_COMMAND} - -E make_directory ${TARGETDIR_VER}/python/lib/)" + " + execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib/\" + COMMAND \"${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/\" + COMMAND \"${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/\" + COMMAND \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32.tar.gz\") + " + CONFIGURATIONS MinSizeRel ) - install( CODE " - if(BUILD_TYPE MATCHES \"Debug\") - set(PYBUNDLE \"python32_d.tar.gz\") - else() - set(PYBUNDLE \"python32.tar.gz\") - endif() - - execute_process(COMMAND ${CMAKE_COMMAND} - -E chdir ${TARGETDIR_VER}/python/lib/ - ${CMAKE_COMMAND} -E tar xzfv ${LIBDIR}/release/\${PYBUNDLE}) + execute_process(COMMAND \"${CMAKE_COMMAND}\" -E chdir \"${TARGETDIR_VER}/python/lib/\" + COMMAND \"${CMAKE_COMMAND}\" -E tar xzfv \"${LIBDIR}/release/python32_d.tar.gz\") " + CONFIGURATIONS Debug ) # doesnt work, todo |