Commit 92837883 authored by Ben Boeckel's avatar Ben Boeckel

smtk: use cmake commands rather than execute_process

parent 7b4ff99c
......@@ -2,18 +2,21 @@
#We only have to do this special installation of the smtk libraries as a plugin
#on MAC
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 ${INSTALL_DIR}/Applications/ModelBuilder.app/Contents/Python/smtk)
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${plugin_install_dir})
file(MAKE_DIRECTORY "${plugin_install_dir}")
set(py_files_libs ${SMTK_BIN_DIR}/lib/SMTKCorePython.so
${SMTK_BIN_DIR}/lib/libshiboken-python${PYTHON_VERSION}.1.2.dylib
${SMTK_BIN_DIR}/lib/python${PYTHON_VERSION}/site-packages/shiboken.so
${SMTK_BIN_DIR}/libexec/python/site-packages/smtk/simple.py)
foreach(lib ${py_files_libs})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${lib} ${TMP_DIR}/SMTKPlugin)
foreach(lib IN LISTS py_files_libs)
configure_file(
"${lib}"
"${TMP_DIR}/SMTKPlugin"
COPYONLY)
endforeach()
execute_process(
......@@ -32,7 +35,10 @@ 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})
foreach(lib IN LISTS fixedUpLibs)
message(STATUS "Installing plugin: ${lib}")
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${lib} ${plugin_install_dir})
configure_file(
"${lib}"
"${plugin_install_dir}"
COPYONLY)
endforeach()
......@@ -20,11 +20,11 @@ elseif (WIN32)
set (LIB_SHIBOKEN_PY "bin/shiboken-python2.7.dll")
endif()
file(REMOVE_RECURSE ${TMP_DIR}/SMTKPlugin)
file(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)
file(MAKE_DIRECTORY ${plugin_install_dir})
file(MAKE_DIRECTORY "${plugin_install_dir}")
if (UNIX)
set(PYTHON_COPY_SOURCE_LOC ${CMAKE_INSTALL_LIBEXECDIR}/python/site-packages)
......@@ -36,8 +36,8 @@ set(py_files_libs ${SMTK_BIN_DIR}/lib/smtkCorePython.${SHARED_LIBRARY_SUFFIX}
${SMTK_BIN_DIR}/${LIB_SHIBOKEN_PY}
${SMTK_BIN_DIR}/${PYTHON_SITE}/shiboken.${SHARED_LIBRARY_SUFFIX}
${SMTK_BIN_DIR}/${PYTHON_COPY_SOURCE_LOC}/smtk/simple.py)
foreach(lib ${py_files_libs})
configure_file(${lib} ${TMP_DIR}/SMTKPlugin COPYONLY)
foreach(lib IN LISTS py_files_libs)
configure_file("${lib}" "${TMP_DIR}/SMTKPlugin" COPYONLY)
endforeach()
execute_process(
......@@ -48,15 +48,15 @@ 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})
configure_file(${lib} ${plugin_install_dir} COPYONLY)
foreach(lib IN LISTS fixedUpLibs)
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)
file(MAKE_DIRECTORY "${STANDALONE_EXPORT_DIR}")
foreach(lib ${fixedUpLibs})
configure_file(${lib} ${STANDALONE_EXPORT_DIR} COPYONLY)
foreach(lib IN LISTS fixedUpLibs)
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