diff options
Diffstat (limited to 'indra/cmake/Prebuilt.cmake')
-rw-r--r-- | indra/cmake/Prebuilt.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index 8d911b339c..4034599fde 100644 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -119,3 +119,14 @@ macro ( use_system_binary package ) endif() endmacro() +find_package(Patch) + +# Download the third party software archive and patch it. +macro(prepare_thirdparty url filename dirname patch hash) + file(DOWNLOAD ${url} ${filename} EXPECTED_HASH SHA512=${hash}) + file(ARCHIVE_EXTRACT INPUT ${filename} + DESTINATION ${CMAKE_SOURCE_DIR}/../..) + execute_process(COMMAND ${Patch_EXECUTABLE} "-p1" "-i" + ${CMAKE_SOURCE_DIR}/../patches/${patch} + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../../${dirname}) +endmacro() |