diff options
author | Oz Linden <oz@lindenlab.com> | 2014-09-26 18:15:43 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2014-09-26 18:15:43 -0400 |
commit | 28bb987738e90f2f741b0792410de0d549ad66db (patch) | |
tree | 7188be556b7c1e7c2c354af6a820f3adbfc70486 /indra/cmake/FindAutobuild.cmake | |
parent | 3fbf0f87c245d740c39ad16274e319890795f084 (diff) |
use the value established by autobuild itself when finding autobuild
Diffstat (limited to 'indra/cmake/FindAutobuild.cmake')
-rwxr-xr-x | indra/cmake/FindAutobuild.cmake | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/indra/cmake/FindAutobuild.cmake b/indra/cmake/FindAutobuild.cmake index 4b5fd484ae..187eae7a08 100755 --- a/indra/cmake/FindAutobuild.cmake +++ b/indra/cmake/FindAutobuild.cmake @@ -6,10 +6,14 @@ # # AUTOBUILD_EXECUTABLE - path to autobuild or pautobuild executable -# *TODO - if cmake was executed by autobuild, autobuild will have set the AUTOBUILD env var -# update this to check for that case + IF (NOT AUTOBUILD_EXECUTABLE) + + # If cmake was executed by autobuild, autobuild will have set the AUTOBUILD env var + IF (DEFINED ENV{AUTOBUILD}) + SET(AUTOBUILD_EXECUTABLE $ENV{AUTOBUILD}) + ELSE (DEFINED ENV{AUTOBUILD}) IF(WIN32) SET(AUTOBUILD_EXE_NAMES autobuild.cmd autobuild.exe) ELSE(WIN32) @@ -27,15 +31,16 @@ IF (NOT AUTOBUILD_EXECUTABLE) ${CMAKE_SOURCE_DIR}/../../.. PATH_SUFFIXES "/autobuild/bin/" ) + ENDIF (DEFINED ENV{AUTOBUILD}) - IF (AUTOBUILD_EXECUTABLE) - GET_FILENAME_COMPONENT(_autobuild_name ${AUTOBUILD_EXECUTABLE} NAME_WE) - MESSAGE(STATUS "Using autobuild at: ${AUTOBUILD_EXECUTABLE}") - ELSE (AUTOBUILD_EXECUTABLE) - IF (AUTOBUILD_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could not find autobuild executable") - ENDIF (AUTOBUILD_FIND_REQUIRED) - ENDIF (AUTOBUILD_EXECUTABLE) + IF (AUTOBUILD_EXECUTABLE) + GET_FILENAME_COMPONENT(_autobuild_name ${AUTOBUILD_EXECUTABLE} NAME_WE) + MESSAGE(STATUS "Using autobuild at: ${AUTOBUILD_EXECUTABLE}") + ELSE (AUTOBUILD_EXECUTABLE) + IF (AUTOBUILD_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find autobuild executable") + ENDIF (AUTOBUILD_FIND_REQUIRED) + ENDIF (AUTOBUILD_EXECUTABLE) - MARK_AS_ADVANCED(AUTOBUILD_EXECUTABLE) + MARK_AS_ADVANCED(AUTOBUILD_EXECUTABLE) ENDIF (NOT AUTOBUILD_EXECUTABLE) |