|
|
|
@ -5,6 +5,10 @@ function(get_timestamp _var)
|
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${SRC_DIR}/externals/cmake-modules")
|
|
|
|
|
|
|
|
|
|
# Find the package here with the known path so that the GetGit commands can find it as well
|
|
|
|
|
find_package(Git QUIET PATHS "${GIT_EXECUTABLE}")
|
|
|
|
|
|
|
|
|
|
# generate git/build information
|
|
|
|
|
include(GetGitRevisionDescription)
|
|
|
|
|
get_git_head_revision(GIT_REF_SPEC GIT_REV)
|
|
|
|
@ -16,20 +20,21 @@ get_timestamp(BUILD_DATE)
|
|
|
|
|
# Also if this is a CI build, add the build name (ie: Nightly, Canary) to the scm_rev file as well
|
|
|
|
|
set(REPO_NAME "")
|
|
|
|
|
set(BUILD_VERSION "0")
|
|
|
|
|
if ($ENV{CI})
|
|
|
|
|
if ($ENV{TRAVIS})
|
|
|
|
|
if (DEFINED ENV{CI})
|
|
|
|
|
if (DEFINED ENV{TRAVIS})
|
|
|
|
|
set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG})
|
|
|
|
|
set(BUILD_TAG $ENV{TRAVIS_TAG})
|
|
|
|
|
elseif($ENV{APPVEYOR})
|
|
|
|
|
elseif(DEFINED ENV{APPVEYOR})
|
|
|
|
|
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
|
|
|
|
|
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME})
|
|
|
|
|
elseif($ENV{BITRISE_IO})
|
|
|
|
|
elseif(DEFINED ENV{BITRISE_IO})
|
|
|
|
|
set(BUILD_REPOSITORY "$ENV{BITRISEIO_GIT_REPOSITORY_OWNER}/$ENV{BITRISEIO_GIT_REPOSITORY_SLUG}")
|
|
|
|
|
set(BUILD_TAG $ENV{BITRISE_GIT_TAG})
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# regex capture the string nightly or canary into CMAKE_MATCH_1
|
|
|
|
|
string(REGEX MATCH "citra-emu/citra-?(.*)" OUTVAR ${BUILD_REPOSITORY})
|
|
|
|
|
if (${CMAKE_MATCH_COUNT} GREATER 0)
|
|
|
|
|
if ("${CMAKE_MATCH_COUNT}" GREATER 0)
|
|
|
|
|
# capitalize the first letter of each word in the repo name.
|
|
|
|
|
string(REPLACE "-" ";" REPO_NAME_LIST ${CMAKE_MATCH_1})
|
|
|
|
|
foreach(WORD ${REPO_NAME_LIST})
|
|
|
|
|