summaryrefslogtreecommitdiff
path: root/indra/cmake/Prebuilt.cmake
blob: 33cdeeeed5217c9f68cb84e88cf7ed969599b84b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# -*- cmake -*-

include(Python)

macro (use_prebuilt_binary _binary)
  if (NOT STANDALONE)
    execute_process(COMMAND ${PYTHON_EXECUTABLE}
                    install.py 
                    --install-dir=${CMAKE_SOURCE_DIR}/..
                    ${_binary}
                    WORKING_DIRECTORY ${SCRIPTS_DIR}
                    RESULT_VARIABLE _installed
                    )
    if (NOT _installed EQUAL 0)
      message(FATAL_ERROR
              "Failed to download or unpack prebuilt '${_binary}'."
              " Process returned ${_installed}.")
    endif (NOT _installed EQUAL 0)
  endif (NOT STANDALONE)
endmacro (use_prebuilt_binary _binary)