Skip to content
Snippets Groups Projects
Commit 4528ce87 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Define project channel in a text file and read in from that with optional environment override

parent 211caf06
No related branches found
No related tags found
No related merge requests found
# -*- cmake -*-
# Construct the viewer version number based on the indra/VIEWER_VERSION file
#Construct the viewer channel from environment variables or defaults
if (DEFINED ENV{VIEWER_CHANNEL_BASE})
set(VIEWER_CHANNEL_BASE $ENV{VIEWER_CHANNEL_BASE} CACHE STRING "Viewer Channel Base Name" FORCE)
else()
set(VIEWER_CHANNEL_BASE "Alchemy" CACHE STRING "Viewer Channel Base Name")
endif()
option(REVISION_FROM_VCS "Get current revision from vcs" ON)
if (DEFINED ENV{VIEWER_CHANNEL_TYPE})
set(VIEWER_CHANNEL_TYPE $ENV{VIEWER_CHANNEL_TYPE} CACHE STRING "Viewer Channel Type Name" FORCE)
else()
set(VIEWER_CHANNEL_TYPE "Test" CACHE STRING "Viewer Channel Type Name")
endif()
if("${VIEWER_CHANNEL_TYPE}" STREQUAL "Project")
if (DEFINED ENV{VIEWER_CHANNEL_CODENAME})
set(VIEWER_CHANNEL_CODENAME $ENV{VIEWER_CHANNEL_CODENAME} CACHE STRING "Viewer Channel Code Name for Project type" FORCE)
else()
set(VIEWER_VERSION_CODENAME_FILE "${CMAKE_CURRENT_SOURCE_DIR}/newview/VIEWER_PROJECT_CODENAME.txt")
if ( EXISTS ${VIEWER_VERSION_CODENAME_FILE} )
file(STRINGS ${VIEWER_VERSION_CODENAME_FILE} VIEWER_CHANNEL_CODENAME)
else()
set(VIEWER_CHANNEL_CODENAME "Default" CACHE STRING "Viewer Channel Code Name for Project type")
endif()
endif()
set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE} ${VIEWER_CHANNEL_CODENAME}")
else()
set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE}")
endif()
# Construct the viewer version number based on the indra/VIEWER_VERSION file
option(REVISION_FROM_VCS "Get current revision from vcs" ON)
find_package(Git)
if (NOT DEFINED VIEWER_SHORT_VERSION) # will be true in indra/, false in indra/newview/
......
......@@ -213,30 +213,6 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Default deploy grid
set(GRID agni CACHE STRING "Target Grid")
if (DEFINED ENV{VIEWER_CHANNEL_BASE})
set(VIEWER_CHANNEL_BASE $ENV{VIEWER_CHANNEL_BASE} CACHE STRING "Viewer Channel Base Name" FORCE)
else()
set(VIEWER_CHANNEL_BASE "Alchemy" CACHE STRING "Viewer Channel Base Name")
endif()
if (DEFINED ENV{VIEWER_CHANNEL_TYPE})
set(VIEWER_CHANNEL_TYPE $ENV{VIEWER_CHANNEL_TYPE} CACHE STRING "Viewer Channel Type Name" FORCE)
else()
set(VIEWER_CHANNEL_TYPE "Test" CACHE STRING "Viewer Channel Type Name")
endif()
if (DEFINED ENV{VIEWER_CHANNEL_CODENAME})
set(VIEWER_CHANNEL_CODENAME $ENV{VIEWER_CHANNEL_CODENAME} CACHE STRING "Viewer Channel Code Name for Project type" FORCE)
else()
set(VIEWER_CHANNEL_CODENAME "Default" CACHE STRING "Viewer Channel Code Name for Project type")
endif()
if("${VIEWER_CHANNEL_TYPE}" STREQUAL "Project")
set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE} ${VIEWER_CHANNEL_CODENAME}")
else()
set(VIEWER_CHANNEL "${VIEWER_CHANNEL_BASE} ${VIEWER_CHANNEL_TYPE}")
endif()
set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer")
set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
......
ShrewdShepherd
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment