Commit f89f58a0 authored by Ghislain MARY's avatar Ghislain MARY

Do not install windows tools if they are already installed.

parent 29d2b028
......@@ -72,25 +72,26 @@ if(MSVC)
endif()
if(WIN32)
message(STATUS "Installing windows tools")
set(_windows_tools_dir ${CMAKE_CURRENT_BINARY_DIR}/windows_tools)
set(_windows_tools_dir ${CMAKE_BINARY_DIR}/windows_tools)
file(MAKE_DIRECTORY ${_windows_tools_dir})
file(DOWNLOAD https://www.linphone.org/files/linphone_builder_windows_tools.zip "${CMAKE_CURRENT_BINARY_DIR}/linphone_builder_windows_tools.zip")
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "tar" "x" "${CMAKE_CURRENT_BINARY_DIR}/linphone_builder_windows_tools.zip"
WORKING_DIRECTORY ${_windows_tools_dir}
)
file(MAKE_DIRECTORY "${LINPHONE_BUILDER_WORK_DIR}/windows_tools")
file(RENAME "${_windows_tools_dir}/awk.exe" "${LINPHONE_BUILDER_WORK_DIR}/windows_tools/awk.exe")
file(RENAME "${_windows_tools_dir}/nasm.exe" "${LINPHONE_BUILDER_WORK_DIR}/windows_tools/nasm.exe")
file(RENAME "${_windows_tools_dir}/patch.exe" "${LINPHONE_BUILDER_WORK_DIR}/windows_tools/patch.exe")
file(RENAME "${_windows_tools_dir}/sed.exe" "${LINPHONE_BUILDER_WORK_DIR}/windows_tools/sed.exe")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
file(RENAME "${_windows_tools_dir}/yasm-1.3.0-win64.exe" "C:/MinGW/bin/yasm.exe")
else()
file(RENAME "${_windows_tools_dir}/yasm-1.3.0-win32.exe" "C:/MinGW/bin/yasm.exe")
if(NOT EXISTS "${CMAKE_BINARY_DIR}/linphone_builder_windows_tools.zip")
message(STATUS "Installing windows tools")
file(DOWNLOAD https://www.linphone.org/files/linphone_builder_windows_tools.zip "${CMAKE_BINARY_DIR}/linphone_builder_windows_tools.zip")
execute_process(
COMMAND "${CMAKE_COMMAND}" "-E" "tar" "x" "${CMAKE_BINARY_DIR}/linphone_builder_windows_tools.zip"
WORKING_DIRECTORY ${_windows_tools_dir}
)
file(MAKE_DIRECTORY "${LINPHONE_BUILDER_WORK_DIR}/windows_tools")
file(RENAME "${_windows_tools_dir}/awk.exe" "${LINPHONE_BUILDER_WORK_DIR}/windows_tools/awk.exe")
file(RENAME "${_windows_tools_dir}/nasm.exe" "${LINPHONE_BUILDER_WORK_DIR}/windows_tools/nasm.exe")
file(RENAME "${_windows_tools_dir}/patch.exe" "${LINPHONE_BUILDER_WORK_DIR}/windows_tools/patch.exe")
file(RENAME "${_windows_tools_dir}/sed.exe" "${LINPHONE_BUILDER_WORK_DIR}/windows_tools/sed.exe")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
file(RENAME "${_windows_tools_dir}/yasm-1.3.0-win64.exe" "C:/MinGW/bin/yasm.exe")
else()
file(RENAME "${_windows_tools_dir}/yasm-1.3.0-win32.exe" "C:/MinGW/bin/yasm.exe")
endif()
endif()
unset(_pkg_config_dir)
endif()
find_program(PATCH_PROGRAM
......
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