mirror of
https://github.com/citra-emu/citra-canary.git
synced 2024-12-23 04:45:33 +00:00
Fix title bar
This commit is contained in:
parent
cf4125a6a5
commit
43c9695bf9
|
@ -5,6 +5,10 @@ function(get_timestamp _var)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${SRC_DIR}/externals/cmake-modules")
|
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
|
# generate git/build information
|
||||||
include(GetGitRevisionDescription)
|
include(GetGitRevisionDescription)
|
||||||
get_git_head_revision(GIT_REF_SPEC GIT_REV)
|
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
|
# 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(REPO_NAME "")
|
||||||
set(BUILD_VERSION "0")
|
set(BUILD_VERSION "0")
|
||||||
if ($ENV{CI})
|
if (DEFINED ENV{CI})
|
||||||
if ($ENV{TRAVIS})
|
if (DEFINED ENV{TRAVIS})
|
||||||
set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG})
|
set(BUILD_REPOSITORY $ENV{TRAVIS_REPO_SLUG})
|
||||||
set(BUILD_TAG $ENV{TRAVIS_TAG})
|
set(BUILD_TAG $ENV{TRAVIS_TAG})
|
||||||
elseif($ENV{APPVEYOR})
|
elseif(DEFINED ENV{APPVEYOR})
|
||||||
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
|
set(BUILD_REPOSITORY $ENV{APPVEYOR_REPO_NAME})
|
||||||
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_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_REPOSITORY "$ENV{BITRISEIO_GIT_REPOSITORY_OWNER}/$ENV{BITRISEIO_GIT_REPOSITORY_SLUG}")
|
||||||
set(BUILD_TAG $ENV{BITRISE_GIT_TAG})
|
set(BUILD_TAG $ENV{BITRISE_GIT_TAG})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# regex capture the string nightly or canary into CMAKE_MATCH_1
|
# regex capture the string nightly or canary into CMAKE_MATCH_1
|
||||||
string(REGEX MATCH "citra-emu/citra-?(.*)" OUTVAR ${BUILD_REPOSITORY})
|
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.
|
# capitalize the first letter of each word in the repo name.
|
||||||
string(REPLACE "-" ";" REPO_NAME_LIST ${CMAKE_MATCH_1})
|
string(REPLACE "-" ";" REPO_NAME_LIST ${CMAKE_MATCH_1})
|
||||||
foreach(WORD ${REPO_NAME_LIST})
|
foreach(WORD ${REPO_NAME_LIST})
|
||||||
|
|
|
@ -12,11 +12,16 @@ if (DEFINED ENV{CI})
|
||||||
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME})
|
set(BUILD_TAG $ENV{APPVEYOR_REPO_TAG_NAME})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Pass the path to git to the GenerateSCMRev.cmake as well
|
||||||
|
find_package(Git QUIET)
|
||||||
|
|
||||||
add_custom_command(OUTPUT scm_rev.cpp
|
add_custom_command(OUTPUT scm_rev.cpp
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
-DSRC_DIR="${CMAKE_SOURCE_DIR}"
|
-DSRC_DIR="${CMAKE_SOURCE_DIR}"
|
||||||
-DBUILD_REPOSITORY="${BUILD_REPOSITORY}"
|
-DBUILD_REPOSITORY="${BUILD_REPOSITORY}"
|
||||||
-DBUILD_TAG="${BUILD_TAG}"
|
-DBUILD_TAG="${BUILD_TAG}"
|
||||||
|
-DGIT_EXECUTABLE="${GIT_EXECUTABLE}"
|
||||||
-P "${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake"
|
-P "${CMAKE_SOURCE_DIR}/CMakeModules/GenerateSCMRev.cmake"
|
||||||
DEPENDS
|
DEPENDS
|
||||||
# WARNING! It was too much work to try and make a common location for this list,
|
# WARNING! It was too much work to try and make a common location for this list,
|
||||||
|
|
Loading…
Reference in a new issue