Commit 8129fd50 authored by Ben Boeckel's avatar Ben Boeckel

smtk: use CMake commands instead of execute_process

parent 9a25740c
......@@ -20,16 +20,16 @@ elseif (WIN32)
set (LIB_SHIBOKEN_PY "bin/shiboken-python2.7.dll")
endif()
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ${TMP_DIR}/SMTKPlugin)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${TMP_DIR}/SMTKPlugin)
file(REMOVE_RECURSE ${TMP_DIR}/SMTKPlugin)
file(MAKE_DIRECTORY ${TMP_DIR}/SMTKPlugin)
set(plugin_install_dir ${SMTK_BIN_DIR}/${PYTHON_INSTALL}/smtk)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${plugin_install_dir})
file(MAKE_DIRECTORY ${plugin_install_dir})
if (UNIX)
set(PYTHON_COPY_SOURCE_LOC ${CMAKE_INSTALL_LIBEXECDIR}/python/site-packages)
elseif (WIN32)
set(PYTHON_COPY_SOURCE_LOC python)
set(PYTHON_COPY_SOURCE_LOC bin/Lib/site-packages)
endif()
set(py_files_libs ${SMTK_BIN_DIR}/lib/smtkCorePython.${SHARED_LIBRARY_SUFFIX}
......@@ -37,7 +37,7 @@ set(py_files_libs ${SMTK_BIN_DIR}/lib/smtkCorePython.${SHARED_LIBRARY_SUFFIX}
${SMTK_BIN_DIR}/${PYTHON_SITE}/shiboken.${SHARED_LIBRARY_SUFFIX}
${SMTK_BIN_DIR}/${PYTHON_COPY_SOURCE_LOC}/smtk/simple.py)
foreach(lib ${py_files_libs})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${lib} ${TMP_DIR}/SMTKPlugin)
configure_file(${lib} ${TMP_DIR}/SMTKPlugin COPYONLY)
endforeach()
execute_process(
......@@ -49,14 +49,14 @@ execute_process(
#okay the plugin is fixed up, now we need to install it into paraviews bundle
file(GLOB fixedUpLibs "${TMP_DIR}/SMTKPlugin/*")
foreach(lib ${fixedUpLibs})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${lib} ${plugin_install_dir})
configure_file(${lib} ${plugin_install_dir} COPYONLY)
endforeach()
# For linux, also copy smtk libs where standalone export app can find them
if (UNIX)
set(STANDALONE_EXPORT_DIR ${SMTK_BIN_DIR}/${PYTHON_SITE}/smtk)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${STANDALONE_EXPORT_DIR})
file(MAKE_DIRECTORY "${STANDALONE_EXPORT_DIR}")
foreach(lib ${fixedUpLibs})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${lib} ${STANDALONE_EXPORT_DIR})
configure_file(${lib} ${STANDALONE_EXPORT_DIR} COPYONLY)
endforeach()
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment