summaryrefslogtreecommitdiff
path: root/indra/cmake/FindAutobuild.cmake
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2015-04-24 08:55:20 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2015-04-24 08:55:20 -0400
commit3ae8a821c3b627f3b02df636e7649f28b97d6f57 (patch)
tree79d5d3f2b262b7f5d60cc6135b80221878aa74b8 /indra/cmake/FindAutobuild.cmake
parent39b17157f9c31a4b911113561d4fc8f86396c430 (diff)
parentfde0868231a25b8c9ce03a86cb53f1738d35688d (diff)
merge
Diffstat (limited to 'indra/cmake/FindAutobuild.cmake')
-rwxr-xr-xindra/cmake/FindAutobuild.cmake36
1 files changed, 19 insertions, 17 deletions
diff --git a/indra/cmake/FindAutobuild.cmake b/indra/cmake/FindAutobuild.cmake
index 4b5fd484ae..ea5ad6d108 100755
--- a/indra/cmake/FindAutobuild.cmake
+++ b/indra/cmake/FindAutobuild.cmake
@@ -4,14 +4,18 @@
#
# Output variables:
#
-# AUTOBUILD_EXECUTABLE - path to autobuild or pautobuild executable
+# AUTOBUILD_EXECUTABLE - path to autobuild 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)
+ SET(AUTOBUILD_EXE_NAMES autobuild.exe autobuild.cmd)
ELSE(WIN32)
SET(AUTOBUILD_EXE_NAMES autobuild)
ENDIF(WIN32)
@@ -21,21 +25,19 @@ IF (NOT AUTOBUILD_EXECUTABLE)
AUTOBUILD_EXECUTABLE
NAMES ${AUTOBUILD_EXE_NAMES}
PATHS
- ENV PATH
- ${CMAKE_SOURCE_DIR}/..
- ${CMAKE_SOURCE_DIR}/../..
- ${CMAKE_SOURCE_DIR}/../../..
+ ENV PATH
+ ${CMAKE_SOURCE_DIR}/..
+ ${CMAKE_SOURCE_DIR}/../..
+ ${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 (NOT AUTOBUILD_EXECUTABLE)
+ IF (AUTOBUILD_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could not find autobuild executable")
+ ENDIF (AUTOBUILD_FIND_REQUIRED)
+ ENDIF (NOT AUTOBUILD_EXECUTABLE)
- MARK_AS_ADVANCED(AUTOBUILD_EXECUTABLE)
+ MARK_AS_ADVANCED(AUTOBUILD_EXECUTABLE)
ENDIF (NOT AUTOBUILD_EXECUTABLE)