diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/cmake/Prebuilt.cmake | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/cmake/Prebuilt.cmake')
-rw-r--r-- | linden/indra/cmake/Prebuilt.cmake | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/linden/indra/cmake/Prebuilt.cmake b/linden/indra/cmake/Prebuilt.cmake new file mode 100644 index 0000000..a915192 --- /dev/null +++ b/linden/indra/cmake/Prebuilt.cmake | |||
@@ -0,0 +1,44 @@ | |||
1 | # -*- cmake -*- | ||
2 | |||
3 | include(Python) | ||
4 | include(FindSCP) | ||
5 | |||
6 | macro (use_prebuilt_binary _binary) | ||
7 | if (NOT STANDALONE) | ||
8 | if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) | ||
9 | if(INSTALL_PROPRIETARY) | ||
10 | include(FindSCP) | ||
11 | if(DEBUG_PREBUILT) | ||
12 | message("cd ${SCRIPTS_DIR} && ${PYTHON_EXECUTABLE} install.py --install-dir=${CMAKE_SOURCE_DIR}/.. --scp=${SCP_EXECUTABLE} ${_binary}") | ||
13 | endif(DEBUG_PREBUILT) | ||
14 | execute_process(COMMAND ${PYTHON_EXECUTABLE} | ||
15 | install.py | ||
16 | --install-dir=${CMAKE_SOURCE_DIR}/.. | ||
17 | --scp=${SCP_EXECUTABLE} | ||
18 | ${_binary} | ||
19 | WORKING_DIRECTORY ${SCRIPTS_DIR} | ||
20 | RESULT_VARIABLE ${_binary}_installed | ||
21 | ) | ||
22 | else(INSTALL_PROPRIETARY) | ||
23 | if(DEBUG_PREBUILT) | ||
24 | message("cd ${SCRIPTS_DIR} && ${PYTHON_EXECUTABLE} install.py --install-dir=${CMAKE_SOURCE_DIR}/.. ${_binary}") | ||
25 | endif(DEBUG_PREBUILT) | ||
26 | execute_process(COMMAND ${PYTHON_EXECUTABLE} | ||
27 | install.py | ||
28 | --install-dir=${CMAKE_SOURCE_DIR}/.. | ||
29 | ${_binary} | ||
30 | WORKING_DIRECTORY ${SCRIPTS_DIR} | ||
31 | RESULT_VARIABLE ${_binary}_installed | ||
32 | ) | ||
33 | endif(INSTALL_PROPRIETARY) | ||
34 | file(WRITE ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${${_binary}_installed}") | ||
35 | else(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) | ||
36 | set(${_binary}_installed 0) | ||
37 | endif(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) | ||
38 | if(NOT ${_binary}_installed EQUAL 0) | ||
39 | message(FATAL_ERROR | ||
40 | "Failed to download or unpack prebuilt '${_binary}'." | ||
41 | " Process returned ${${_binary}_installed}.") | ||
42 | endif (NOT ${_binary}_installed EQUAL 0) | ||
43 | endif (NOT STANDALONE) | ||
44 | endmacro (use_prebuilt_binary _binary) | ||