diff options
author | andreykproductengine <akleshchev@productengine.com> | 2015-04-29 15:28:21 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2015-04-29 15:28:21 +0300 |
commit | 5f397bdd1831b1be593982ca8fc88dbe1a0cad07 (patch) | |
tree | 1d0b8a8973a30bf3c65f09da653b0e7c009053fd /indra/cmake/Prebuilt.cmake | |
parent | 1382e9bae647d6b548cd9a1fc78339e5929ea202 (diff) | |
parent | fde0868231a25b8c9ce03a86cb53f1738d35688d (diff) |
Merge from viewer-release
Diffstat (limited to 'indra/cmake/Prebuilt.cmake')
-rwxr-xr-x | indra/cmake/Prebuilt.cmake | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/indra/cmake/Prebuilt.cmake b/indra/cmake/Prebuilt.cmake index e548805148..98013da2f2 100755 --- a/indra/cmake/Prebuilt.cmake +++ b/indra/cmake/Prebuilt.cmake @@ -8,44 +8,50 @@ if(INSTALL_PROPRIETARY) include(FindSCP) endif(INSTALL_PROPRIETARY) +set(PREBUILD_TRACKING_DIR ${AUTOBUILD_INSTALL_DIR}/cmake_tracking) +# For the library installation process; +# see cmake/Prebuild.cmake for the counterpart code. +if ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${PREBUILD_TRACKING_DIR}/sentinel_installed") + file(MAKE_DIRECTORY ${PREBUILD_TRACKING_DIR}) + file(WRITE ${PREBUILD_TRACKING_DIR}/sentinel_installed "0") +endif ("${CMAKE_SOURCE_DIR}/../autobuild.xml" IS_NEWER_THAN "${PREBUILD_TRACKING_DIR}/sentinel_installed") + # The use_prebuilt_binary macro handles automated installation of package # dependencies using autobuild. The goal is that 'autobuild install' should # only be run when we know we need to install a new package. This should be # the case in a clean checkout, or if autobuild.xml has been updated since the -# last run (encapsulated by the file ${CMAKE_BINARY_DIR}/temp/sentinel_installed), +# last run (encapsulated by the file ${PREBUILD_TRACKING_DIR}/sentinel_installed), # or if a previous attempt to install the package has failed (the exit status # of previous attempts is serialized in the file -# ${CMAKE_BINARY_DIR}/temp/${_binary}_installed) +# ${PREBUILD_TRACKING_DIR}/${_binary}_installed) macro (use_prebuilt_binary _binary) if (NOT DEFINED USESYSTEMLIBS_${_binary}) set(USESYSTEMLIBS_${_binary} ${USESYSTEMLIBS}) endif (NOT DEFINED USESYSTEMLIBS_${_binary}) if (NOT USESYSTEMLIBS_${_binary}) - if("${${_binary}_installed}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/${_binary}_installed") - file(READ ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${_binary}_installed") + if("${${_binary}_installed}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/${_binary}_installed") + file(READ ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${_binary}_installed") if(DEBUG_PREBUILT) message(STATUS "${_binary}_installed: \"${${_binary}_installed}\"") endif(DEBUG_PREBUILT) - endif("${${_binary}_installed}" STREQUAL "" AND EXISTS "${CMAKE_BINARY_DIR}/temp/${_binary}_installed") + endif("${${_binary}_installed}" STREQUAL "" AND EXISTS "${PREBUILD_TRACKING_DIR}/${_binary}_installed") - if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) + if(${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) if(DEBUG_PREBUILT) message("cd ${CMAKE_SOURCE_DIR} && ${AUTOBUILD_EXECUTABLE} install --install-dir=${AUTOBUILD_INSTALL_DIR} - --skip-license-check ${_binary} ") endif(DEBUG_PREBUILT) execute_process(COMMAND "${AUTOBUILD_EXECUTABLE}" install --install-dir=${AUTOBUILD_INSTALL_DIR} - --skip-license-check ${_binary} WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}" RESULT_VARIABLE ${_binary}_installed ) - file(WRITE ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${${_binary}_installed}") - endif(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) + file(WRITE ${PREBUILD_TRACKING_DIR}/${_binary}_installed "${${_binary}_installed}") + endif(${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/${_binary}_installed OR NOT ${${_binary}_installed} EQUAL 0) if(NOT ${_binary}_installed EQUAL 0) message(FATAL_ERROR |