Permalink
Browse files

BUG: Merge remote-tracking branch 'kwsource/WindowsPython'

Conflicts:
	SuperBuild/python_patch_step_win.cmake.in

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20622 3bd1e089-480b-0410-8dfb-8563597acbee
  • Loading branch information...
1 parent bde06b5 commit 1a0db6a2bc7e8f0f1f27ec92b3a35b217998d4f9 mccormic committed Jul 13, 2012
@@ -1,8 +1,6 @@
-
file(READ ${in} code)
string(REPLACE "${find}" "${replace}" code_updated "${code}")
# Write output file only if required
if(NOT "${code}" STREQUAL "${code_updated}")
file(WRITE ${out} "${code_updated}")
endif()
-
@@ -58,6 +58,9 @@ else()
set(PythonPCBuildDir ${CMAKE_BINARY_DIR}/python-build/PCbuild)
endif()
+file(TO_CMAKE_PATH "${in}" in)
+file(TO_CMAKE_PATH "${out}" out)
+file(TO_CMAKE_PATH "${script}" script)
set(python_SOURCE_DIR ${python_build})
configure_file(SuperBuild/python_patch_step_win.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/python_patch_step.cmake
@@ -101,16 +104,6 @@ ExternalProject_Add(${proj}
${python_DEPENDENCIES}
)
-# on Win64 we use tcl 8.5
-if(Slicer_USE_PYTHONQT_WITH_TCL AND NOT "${CMAKE_SIZEOF_VOID_P}" EQUAL 8)
- # this must match the version of tcl we are building for slicer.
- ExternalProject_Add_Step(${proj} Patch_tcltk_version
- COMMAND ${CMAKE_COMMAND} -Din=${in} -Dout=${out} -Dfind=85 -Dreplace=84 -P ${script}
- DEPENDEES configure
- DEPENDERS build
- )
-endif()
-
build_python_target(make_versioninfo build)
build_python_target(make_buildinfo Build_make_versioninfo)
build_python_target(kill_python Build_make_buildinfo)
@@ -22,10 +22,15 @@ configure_file(
"@python_SOURCE_DIR@/Lib/distutils/msvc9compiler.py"
COPY)
-
-# 32-bit or 64-bit
-if("${@CMAKE_SIZEOF_VOID_P@}" EQUAL 8)
- execute_process(COMMAND ${CMAKE_COMMAND} -Din=@in@ -Dout=@out@ -Dfind=\\tcltk64 -Dreplace=\\tcl-build -P @script@)
-else()
- execute_process(COMMAND ${CMlKE_COMMAND} -Din=@in@ -Dout=@out@ -Dfind=\\tcltk -Dreplace=\\tcl-build -P @script@)
+# Prevent warning about if(ON).
+cmake_policy(SET CMP0012 NEW)
+if(@Slicer_USE_PYTHONQT_WITH_TCL@)
+ # 32-bit or 64-bit
+ if("${@CMAKE_SIZEOF_VOID_P@}" EQUAL 8)
+ execute_process(COMMAND ${CMAKE_COMMAND} -Din:FILEPATH=@in@ -Dout:FILEPATH=@out@ -Dfind=\\tcltk64 -Dreplace=\\tcl-build -P "@script@")
+ else()
+ execute_process(COMMAND ${CMAKE_COMMAND} -Din:FILEPATH=@in@ -Dout:FILEPATH=@out@ -Dfind=\\tcltk -Dreplace=\\tcl-build -P "@script@")
+ # on Win64 we use tcl 8.5
+ execute_process(COMMAND ${CMAKE_COMMAND} -Din:FILEPATH=@in@ -Dout:FILEPATH=@out@ -Dfind=85 -Dreplace=84 -P "@script@")
+ endif()
endif()

0 comments on commit 1a0db6a

Please sign in to comment.