Avoid unix-based mkdir usage on windows.

This commit is contained in:
Shyotl
2015-01-29 04:03:45 -06:00
parent a0487b12be
commit 91b6d68eae
2 changed files with 7 additions and 4 deletions

View File

@@ -26,13 +26,13 @@ function(copy_files paths names dest)
foreach(f ${names}) foreach(f ${names})
foreach(p ${paths}) foreach(p ${paths})
set(from_file "${p}/${f}") set(from_file "${p}/${f}")
set(to_dest "${CMAKE_BINARY_DIR}/newview/${dest}") set(to_dest "${CMAKE_BINARY_DIR}/newview/${dest}/")
if(EXISTS ${from_file}) if(EXISTS ${from_file})
message("Copying ${from_file} to ${to_dest}") message("Copying ${from_file} to ${to_dest}")
if(NOT EXISTS ${to_dest}) if(NOT EXISTS ${to_dest})
execute_process(COMMAND mkdir -p "${to_dest}") execute_process(COMMAND md "${to_dest}")
endif(NOT EXISTS ${to_dest}) endif(NOT EXISTS ${to_dest})
execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${from_file} ${to_dest} RESULT_VARIABLE result) execute_process(COMMAND ${CMAKE_COMMAND} -E copy "${from_file}" "${to_dest}${f}" RESULT_VARIABLE result)
if(${result}) if(${result})
message(SEND_ERROR "Unsuccessful.") message(SEND_ERROR "Unsuccessful.")
endif(${result}) endif(${result})

View File

@@ -1712,7 +1712,9 @@ if (DARWIN)
--grid=${GRID} --grid=${GRID}
--source=${CMAKE_CURRENT_SOURCE_DIR} --source=${CMAKE_CURRENT_SOURCE_DIR}
--extra_libraries="${MANIFEST_LIBRARIES}" --extra_libraries="${MANIFEST_LIBRARIES}"
DEPENDS ${VIEWER_BINARY_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py DEPENDS
${VIEWER_BINARY_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
) )
add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit basic_plugin_filepicker) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin media_plugin_quicktime media_plugin_webkit basic_plugin_filepicker)
@@ -1738,6 +1740,7 @@ if (DARWIN)
--extra_libraries="${MANIFEST_LIBRARIES}" --extra_libraries="${MANIFEST_LIBRARIES}"
--touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched --touch=${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/.${product}.touched
DEPENDS DEPENDS
${VIEWER_BINARY_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py ${CMAKE_CURRENT_SOURCE_DIR}/viewer_manifest.py
) )
endif (PACKAGE) endif (PACKAGE)